Search code examples
javascriptdateschedulerdhtmlx

Can I get the date of the current view? (DHTMLX Scheduler)


When I load the web, the DHTMLX Scheduler load the view of current day (today). But, it's possible to get the date if I go to other past days? For example:

Today = 02/05/2013

I go, using the left arrows, to show the events of 25/04/2013. Then, using javascript, can I get the date of 25/04/2013 to do something like reload the Scheduler to this date directly using scheduler.init("",date,"");?

Thanks.


Solution

  • Try scheduler.getState method:

    var date = scheduler.getState().date;
    var minDate = scheduler.getState().min_date;
    var maxDate = scheduler.getState().max_date;
    

    here is related doc: scheduler.getState