This topic contains 2 replies, has 2 voices, and was last updated by master 7 years, 6 months ago.
You must be logged in to reply to this topic.
This topic contains 2 replies, has 2 voices, and was last updated by master 7 years, 6 months ago.
Hello,
I want to set the duration of a double-click created event to a length the user sets as a default. I want an event created by dragging on the calendar to always be the duration of the drag. I am having trouble because I cannot distinguish how the “New” parameter was generated for the Calendar Click Actions script; i.e., was it a double-click or a drag.
Can you tell me how to distinguish the two? Thanks — Mark
Good question, Mark.
There is no built-in way, since a new event is a new event. But I have a pretty good workaround for you – add this snippet to your Custom JS field, and double-clicking will default to 1 minute long events while dragging inevitably will not:
scheduler.config.event_duration = 1;
scheduler.config.auto_end_date = true;
Excellent! That solves my issue.
Thanks — Mark
You must be logged in to reply to this topic.