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

Month name as title for DayPilot Month

Asked by Ed
10 months ago.

Hi,

How would you get the month that the monthly calendar (or current month from the Navigator) and add it as a title above the calendar?

Thanks

Answer posted by Dan Letecky [DayPilot]
10 months ago.

For PostBack updates, you can place a label control above the calendar and set its text from code behind based on DayPilotMonth.StartDate value.

If you change the date using a callback, you can use AfterRenderJavaScript to change the value on the client side. Something like this:

AfterRenderJavaScript="document.getElementById('monthLabel').innerText = dp.startDate.toString('MMMM yyyy');"
Comment posted by Ed
10 months ago.

Ugh, I could have sworn that I tried that… works, thanks.

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