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

Display week range date

Asked by G Bill
12 years ago.

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;


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. :)

Comment posted by Dan Letecky
12 years ago.
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.)

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