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

Month name as title for DayPilot Month

Asked by Ed
14 days 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]
13 days 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
13 days 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):