addEventNow
Description
Adds a new event and opens the lightbox to confirm
addEventNow: (event: any) => string
Parameters
event- (required) object - the event object
Returns
id- (string) - the event's id
Example
scheduler.addEventNow();
//or
scheduler.addEventNow({
start_date: new Date(2013,0,10,8,30),
end_date: new Date(2013,0,10,10,30),
text: "Meeting",
holder: "John", //userdata
room: "5" //userdata
});
Related samples
Details
The event object can have the following properties:
| start_date | (Date, string) the date, when the event is scheduled to begin. By default, the current date. If the property is specified as a string, the '%d-%m-%Y %H:%i' format should be used (to change the default format, use the api_date option) |
| end_date | (Date, string) the date, when the event is scheduled to be completed. By default, the current date + time_step value. If the property is specified as a string, the '%d-%m-%Y %H:%i' format should be used (to change the default format, use the api_date option) |
| text | (string) the event's text |
| id | (string) the event's id. If not specified, the id for the event will be generated automatically |
| userdata | (hash) a collection of custom properties presented as 'key-value' pairs |
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.