Skip to main content

getRecDates

Description

Returns all occurrences of a recurring event

getRecDates: (id: string, number: number) => any

Parameters

  • id - (required) string - the id of a recurring event
  • number - (required) number - the maximum number of occurrences to return (by default, 100)

Returns

  • event - (object) - an object with 2 properties:
    • start_date - (Date) the start date of a single occurrence
    • end_date - (Date) the end date of a single occurrence

Example

var dates = scheduler.getRecDates(22);

Details

note

The property requires the recurring extension to be enabled.

For example, there is a recurring event (id: 22) which takes place every 2 days from 14.00 till 15.00, starting from 12th November, 2010; there are 3 occurrences in total. The getRecDates method for this event will return the 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)
}
]

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.