gets the current state of the scheduler
object | the state object |
var mode = scheduler.getState().mode;
if(mode == "day"){
// custom logic here
}
else {
// custom logic here
}
The state object reflects inner UI configuration of the scheduler and has the following properties:
mode | (string) the currently opened view |
date | (Date) the active date |
min_date | (Date) the date that events are displayed in the currently opened view from |
max_date | (Date) the date that events are displayed in the currently opened view till |
editor_id | (string) the id of an event that is currently being edited in the inline editor. 'Undefined' or 'null', if no events are being edited in the inline editor. |
lightbox_id | (string) the id of an event that is currently opened in the lightbox. 'Undefined' or 'null', if no events are opened in the lightbox. |
new_event | (Date) a flag that indicates whether a new event is being creating at the current moment. Current date, if a new event is being created in the scheduler. 'Undefined' or 'null', if no new events are being created in the scheduler. |
select_id | (string) the id of the currently selected event. 'Undefined' or 'null', if no events are selected in the scheduler. |
expanded | (boolean) gets true, when the scheduler is expanded. 'Undefined' or 'null', if the scheduler is in its normal size or the expand extension isn't enabled in the app. |
drag_id | (string) the id of an event that the user is currently dragging in the scheduler. 'Undefined' or 'null', if no tasks are being dragged in the scheduler. |
drag_mode | ('move','resize','create', 'new-size') the drag mode. 'Underfined' or 'null', if no events are being dragged in the scheduler. |
Note, scheduler's behavior can not be changed by modifying this object.