1. I am assuming you know how to install calendar correctly.
2. Set up your tables correctly, making sure you have a start datetime (format type datetime in AG) and end datetime(format type datetime in AG). I find the date/time pickers a bit cumbersome, so to speed up input, I have a third field: duration. (format type INT in AG). In the Options List for duration, I have 15,30,45,60 minute durations.
The end datetime is a calculated field. set the data type to datetime and also check 'read only'. In the calculated field tab, add the following sql query:
Code: Select all
SELECT
date_add(`start_date`,INTERVAL `duration` MINUTE)
FROM
your_database_name.your_table_name
WHERE
your_table_name.id = %ID%
Once you have installed the calendar, created at least one event type and one calendar, click the blue "GENERATE CALENDAR FILES' button. in your HOOKS folder, you will find a file called calendar-your_calender_name.php. Open it up using your favourite editor, and scroll to about line 67 and look for TIMEGRIDWEEK. Immediately after scrollTime: Cal.scrollTime, paste in the following code:
Code: Select all
slotDuration: '00:15:00',
slotLabelInterval: "00:15",
minTime: "06:00:00",
maxTime: "18:15:00",
axisFormat: 'HH:mm'
Now scroll down to TIMEGRIDDAY, and paste in exactly the same code as above. Save the file.
that's it, you're done! Both the day view and the week view will now render in 15-minute increments and are correctly labelled.
Other:
there is a div id called
<div id="your_calendar_name"></div>, so you could do this using jquery in the header-extras.php file,but I couldn't get it to work.
Remember that changes to your calendar will mean regenerating your files and the edited PHP file will be overwritten.
MD