Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vineetha on Nov 30, 2009 04:46
open dhtmlx forum
Mini Calendar retrieving problem agsin

Hi

I have asked for a solution to retrieve events when i select date from a mini calendar in dhtmlscheduler. You have given me the answer like this

var evs = scheduler.getEvents(new Date(2009,10,10),new Date(2009,12,25));

for (var i=0; i<evs.length; i++)
alert(evs[i].text);

But it is outputting null. Please tell me the reason. Is there any more code fragments i need to add to get this working fine.

Thank You
Vineetha
Answer posted by Alex (support) on Nov 30, 2009 06:56

Hello,

the provided code snippet was just an example. Here new Date(2009,10,10) is start date object, new Date(2009,12,25) is end date object.

The method can be called after scheduler xml is loaded.

scheduler.load(url,function(){

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

   for (var i=0; i<evs.length; i++) 
       alert(evs[i].text);
}

});