I am using ext_matrix.js in order to display an event to take up the entire cell for which it was entered on. However, when I go to create an event, I would really like the following two lines to still work;
scheduler.config.event_duration = 480;
scheduler.config.auto_end_date = true;
What would I need to do to make this happen?
What mode are you using: matrix, timeline? If you double click cell in the timeline mode event start and end dates would be set automatically to fit that cell.
When the event is first created, it adheres to the rules defined by;
scheduler.config.first_hour = 7;
scheduler.config.last_hour = 22;
scheduler.config.limit_time_select = true;
Which is evident in the attached picture. The start date is set at 07:00. However, the end date is set to a full 24 hours later, ending at 07:00 the following day.
If I change the start time to 07:05, it automatically sets the end time to 480 minutes later - at 15:05 on the same day. This is achieved by the following rules;
Question is; how can I make it so that when the event is first created it abides by the rules in the second code listing above straight away (without me having to change the start date).
@Ilya I figured this was what was occurring. Any examples on how I could use this event to set appropriate end time to that set by
scheduler.config.event_duration = 480;
@Stanislav I am not using that property - so it is defaulting to 5 minute increments. So I am OK there. I think Ilya is right; the default behavious for ext_matrix.js is to set the end time automatically to + 24 hours after the start time. If I use that event he mentions, I should be able to override it. But thanks for mentioning that config parameter - I didn’t want 5 minute increments!!!
I still need help with this one. As soon as an event is created (by double-clicking on an empty cell), I would like the start and end times set to default values.