getRecDates(event_id, maximum_number)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxscheduler_recurring.js

  • event_id — id of the recurring event
  • maximum_number — maximum number of the occurrences which will be returned (by default 1000)

Returns all occurrences of a recurring event as array of objects with following properties:

  • start_date
  • end_date

For example, there is an recurring event (id: 22) which happens every 2 days from 14.00 till 15.00 on 12.10.2010 for 3 occurrences total, to get all occurrences of this event execute:

var dates = scheduler.getRecDates(22);

Dates variable will hold following array:

[
    { 
      start_date: Tue Oct 12 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 12 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    },
    { 
      start_date: Tue Oct 14 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 14 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    },
    { 
      start_date: Tue Oct 16 2010 14:00:00 GMT+0300 (E. Europe Daylight Time),
      end_date: Tue Oct 16 2010 15:00:00 GMT+0300 (E. Europe Daylight Time)
    }
]