Home Unanswered Active Tags New Question

Chnage BusinessStart and End hours programmatically on command call back

Hi Dan,

Everything worked fine with my DayPilotNavigator(DPN) & DayPilotCalender(DPC) until I decided to change BusinessBeginsHour & BusinessEndsHour programmatically. So here is my scinario. I have DPN & DPC on one page. In DPN I have TimeRangeSelectedHandling="JavaScript" TimeRangeSelectedJavaScript="ChangeWeek(start,end)" . In my javascript function it simply calls "dps.commandCallBack('navigate',{ "start" : start, "end": end });" .

Now in my code behind when this commandCallBack is called I need to change BusinessBeginsHour & BusinessEndsHour depends on events availability.(eg. If in selected week event starts at 7:30 AM, BusinessBeginsHour should be 7). Now when I try to change week on my page, it does not update calender control or any BusinessHourswith new events rather it gets stuck at javascript error. " '$w.colors[...]' is null or not an object URI:http://myproject/WebResource.axd?d=FPJoI......." .

I already tried with rebinding whole DPN & DPC & CallBackUpdateType.Full. but it still gives same error. BTW I have DPC.HeightSpec = HeightSpecEnum.BusinessHoursNoScroll. If I keep BusinessBeginsHour & BusinessEndsHour same hard coded, then everything works fine.

any solution to this? is it bug or know issue? or is this how it suppose to work?

Thanks

Asked by Bhavesh Patel 2 years ago.
Replies

hmmmm!

I used TimeRangeSelectedHandling="PostBack" and it worked. I think when we do command callback, it is not suppose to render Full calender.

I am posting this so it may help someone else having same issue.

Comment posted by Bhavesh Patel 2 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java