creates a mini calendar
config | object | the calendar configuration object |
HTMLElement | the HTML element of the calendar |
const calendar = scheduler.renderCalendar({
container:"cal_here",
navigation:true,
handler:function(date, calendar){
scheduler.setCurrentView(date, scheduler._mode);
}
});
The method requires the minical plugin to be activated.
The configuration object can have the following properties:
container | (string, object) an HTML container ( or its id) where a calendar will be initialized. Optional |
position | (object) the position of the calendar. Can be specified as a set of coordinates of the id of an HTML object |
date | (string) the initial date of the calendar |
navigation | (boolean) enables/disables month navigation buttons |
handler | (function) the handler function that will treat clicks on the calendar. Takes the clicked date and the calendar object as parameters |
const calendar = scheduler.renderCalendar({
container:"for_calendar",
date:new Date()
});
//
const calendar = scheduler.renderCalendar({
position:"some_id",
date:new Date()
});
//
const calendar = scheduler.renderCalendar({
position: { left: 100, top: 50 },
date:new Date()
});