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

Can this be used as a timetable?

Asked by Anonymous
9 years ago.
I have data in my database e.g: ID StartDate EndDate Item 1 Monday 12:00 Monday 14:00 Project Management 2 Tuesday 8:00 Tuesday 10:00 Maths I've been looking over the documentation, and it seems to me that this is possible, I just can't work out how best to go about it. Any suggestions?
Comment posted by Anonymous
9 years ago.
Sorry, I just read over my post and it doesn't reflect anything I was trying to say. At present, Im showing a week e.g. Sunday to Saturday. In my database I have the records stored as a day and a time because it is a set weekly thing. I need to convert the Monday into a date that DayPilot can use.
Answer posted by Dan Letecky
9 years ago.

Yes, it can be used to show a timetable. You only need to transform your day value to a certain date.

The easiest way would be to pick a year which starts on the same day of the week. That's the case of 2012 (for weeks starting on Sunday). So you can store Sunday as 2012-01-01, Monday as 2012-01-02 etc.

You can also store days of week as integers and transform them to dates using your SELECT command.

In the Calendar, set HeaderDateFormat="dddd" to show just the name of the day in the header. Use BeforeEventRender to override the default event HTML if needed.

Comment posted by Dan Letecky
9 years ago.

Oh sorry, the BeforeEventRender part only applies to the Pro edition.

Comment posted by Dan Letecky [DayPilot]
7 years ago.

The following tutorial shows how to create a weekly timetable using DayPilot Pro:

http://code.daypilot.org/65101/timetable-tutorial-asp-net-c-vb-net

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