Our powerful JS Calendar component


Post by orthobridge »

Is there a way to detect any active timerange when double clicking on a dayview ?


Post by Animal »

No. they are background, not events.

You could use a scheduleDblClick listener, and in the handler, test whether the position was occupied by a TimeRange.


Post by marcio »

Just like Animal said, you can achieve that by using the scheduleDblClick listener, an initial snippet would look like this

listeners : {
        scheduleDblClick : function(eventData) {
            console.log('eventData', eventData);
            console.log('this', this); // this will be the Calendar component
        }
    }

And from there, you can check the time ranges available in the Calendar (calendar.timeRanges).

https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#event-scheduleDblClick

https://bryntum.com/products/calendar/docs/api/Scheduler/feature/TimeRanges

Best regards,
Márcio


Post by orthobridge »

Thanks. I thought there might be an easier way. The proposed feature is now moved to the long-term roadmap !!!


Post Reply