Event Duration Method

Hello,

I have a duration field (in hours) and I want to provide the option for the user to be able to set the start date and then specify how many hours the event should last for.

Is there an internal function in the scheduler that I can use to quickly retrieve how long the current event is…?

Thanks

Hi,
unfortunately there is no such function, you’ll have to calculate the duration manually. E.g. var duration_hours = (end_date - start_date) / (1000 * 60 * 60)