search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to show or bind the weekdays dynamically?

Asked by Anonymous
6 years ago.


I am using Daypilot lite with Mvc. In this I have created a calendar with week and now i want to give the dates dynamically. In the selection it is appearing by default as current week, but i want to make it binding from database. Whichever week will be there in the database that week will appear not current week.

Please help me out.

Answer posted by Dan Letecky [DayPilot]
6 years ago.

You can specify the week date using StartDate property.

It is accessible in the config (DayPilotCalendarConfig class):

@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig { 
  BackendUrl = Url.Content("~/Calendar/Backend"),
  ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Week,
  StartDate = new DateTime(2015, 1, 1),
  // ...

and also in the backend class:

protected override void OnInit(InitArgs e)
  StartDate = new DateTime(2015, 1, );
  // ...

Comment posted by Manish
6 years ago.

Thanks a lot... Its working...

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.