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

Month name as title for DayPilot Month

Asked by Ed
1 day 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]
1 day 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
1 day ago.

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

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):