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

Chnage BusinessStart and End hours programmatically on command call back

Asked by Bhavesh Patel
14 years ago.

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

Comment posted by Bhavesh Patel
14 years ago.

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.

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