Start Building Professional
Web Apps Today

Categories Question details Back To List
Question  posted by Simon Irving on Oct 21, 2009 02:32
open dhtmlx forum
Jump to first event in dHTMLXScheduler

Good morning,

I was wondering if is possible to ask the scheduler to 'jump' to the first event in the dataset?

As I understand it, the calender will show the current date upon loading. However, I would like it to show the first event, which may be many weeks in the future.

Thanks for your help.

Answer posted by Alex (support) on Oct 21, 2009 08:52


you can try to use the following method:

var evs = scheduler.getEvents(new Date(), new Date(9999,1,1);

evs = evs.sort(function(a,b){ return a.start_date<b.start_date?1:-1;});