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 » Changing time format on events in Month calendar

Changing time format on events in Month calendar

I have been integrating the DayPilot into my website www.teamyell.co.nz for the last few days. Have a look at www.teamyell.co.nz/abc/eventsin a day or two (once I deploy).

My site displays timein the format"7am" or "8:15am"to save room (lowercase "am", no intervening space, remove trailing ":00"). I have implemented code to modify how events are displayed in the "Week View". However I can not work out how to modify the times shownin events in the "Month View" calendar. They currently show as say "7:00 AM" in top left and "8:15 AM" in top right. I want to show "7am" and "8:15am".

How can I do this?

Regards

Philip Q

Philip Quirke - 7/5/2008 2:58:23 AM
Hi Philip,

Sorry for the delay. I see that you've already found the solution.

There are three options:

1. Change the current culture, e.g.
<%@ Page Culture="en-US" ... %>
2. Change the TimeFormat property, e.g.
<DayPilot:DayPilotMonth TimeFormat="Clock12Hours" ... />
3. Modify the Month.js in the source code (this.drawEvent definition).

See also a related post on turning off the time labels:
http://forums.daypilot.org/Topic.aspx/377/remove_time_from_events_in_month
Dan Letecky - 7/14/2008 9:58:36 AM
Post reply