New default event time determined by "MarkedTimespan"


I think this screenshot will explain it better:

I’d like to doubleClick in a calendar to create an event and take the MarkedTimespan behind it (in the image is the yellow portion) to specify the start and end datetimes of the new event.

Is it possible?

currently there is no API for retrieving an instance of a marked timespan.
You can only check if event(or any given time span) overlaps with a marked timespan of a certain type

scheduler.checkInMarkedTimespan(scheduler.getEvent(eventId), "timespan type");


scheduler.checkInMarkedTimespan({ start_date:new Date(some value), end_date: new Date(some other value), section_id:if any}, "timespan type" );

So you can detect if time is located in a marked timespan. But there is no ready way to get start/end date of that timespan … espan.html

If you manage to calculate the default time value, you can assign it in onEventCreated event handler … event.html

Thx for the tip! That’s is how I did it: I’ve overwritten the scheduler.showLightbox to make a checkInMarkedTimespan and, if is returns true, make an ajax call to the database to get the nearest marked timespan dates. After that I set the event dates with scheduler.getEvent(idEvent).start_date/end_date and finally starts the lightbox (scheduler.startLightbox).

It’d be nice to have a method to retrieve an instance of a marked timespan to avoid check make ajax calls to get an info that we already have in the calendar.