Outlook-esque "Week View" Calendar |
[eluser]derekmichaeljohnson[/eluser]
I'm attempting to create a week view calendar with 7 columns (days of the week) and 8 rows (work hours of the day 9am to 5pm). See this image for an example. How can I best create a model that would not only populate an array with the hours in a work day (9am to 5pm) but also assign any events (from the db) to that hour, if any? Example: Code: array( Thanks in advance!
[eluser]Jondolar[/eluser]
Hi derek, I wrote a calendaring program many moons ago. My technique was to create an array of all the hours that I wanted to be covered in the calendar by default. Then, query the database for all events of the day and assign each event to the proper array subscript. Code: $cal = array( This allows for multiple events per time slot. |
Welcome Guest, Not a member yet? Register Sign In |