DayPilot Forums

DayPilot is the best open-source Outlook-like calendar control for ASP.NET.
DayPilot Pro Demo (Calendar control)
» DayPilot Pro live demo (Calendar control)
DayPilot Pro Demo (Scheduler control)
» DayPilot Pro live demo (Scheduler control)
Home » How To » Display week range date

Display week range date

I'm trying out the trial of the full version and have two images with hyperlinks wrapped around them to move to the previous and next week using the javascript call;

javascript:progTT.refreshCallBack(-7);

Next to this I have an asp label control to show the date range of the week currently being viewed, e.g. 09 June - 14 June 2008.

When I click the image to move to another week, I'd like to update the date range in the asp label control with the currently viewed week however I can't get this too work. It remains at the original date.

In my code, I've got a function to return the date correctly formatted for output and I'm calling this in the DayPilot_Refresh event on the server-side. The calendar changes weeks fine but the label never updates.

Any ideas?

Great control BTW. :)

G Bill - 6/13/2008 12:52:00 AM
That's because during CallBack you can only update DayPilotCalendar itself (and only the selected properties). If you want to update something else (Label should be fine), you should pass your data using DayPilotCalendar.Update("yourDataHere") back to the client and then update the Label in AfterRenderJavaScript.

You can find a similar example in Demo/Calendar/Default.aspx. It shows a hidden div for a while after update.
(And sorry for the delay with the asnwer.)

Dan Letecky - 6/16/2008 11:05:09 PM
Post reply