Premium support for our pure JavaScript UI components


Post by steven alves »

Hello.

Our timespan config
Image

We are trying to keep the initial startDate and endDate config when the time range header it clicked two time.

If you choose a day and click the timespan will change to 24h format and not respecting the range.
Image

I used "timeRangeHeaderDblClick " event so that I can change the scheduler configuration but not seems good solution
and I did not managed to have the event after the clicks.

Also I used the "zoomKeepsOriginalTimespan" but no success.

Image

Seeing the documentation see a lot of resources in releated to time range and zoom manipulation
https://bryntum.com/docs/gantt/api/Scheduler/feature/TimeRanges

Last edited by steven alves on Thu Nov 17, 2022 1:27 pm, edited 1 time in total.

Post by mats »

Do you want to prevent the built-in zoom action on double click? If so, please see: https://bryntum.com/docs/scheduler/api/Scheduler/view/mixin/TimelineZoomable#config-zoomOnTimeAxisDoubleClick


Post by steven alves »

its not prevent but preserve the initial configuration and referring to the first screen shot the range is between 6 and 21 hour of the day and screenshot shows the day without time, that its ok but when we click on a day we lost the initial time configuration so it stays now between 12AM and 10PM and we should keep it between 6 and 21h


Post by steven alves »

Using timeRangeHeaderDblClick event I was not able to catch the event when double click the day that is zooming in to this 12AM and 10PM state so that I could reconfigure the scheduler again.


Post by steven alves »

 schedulerRef.current = new Scheduler({
        startDate: schedulerStartTime(dateParam, 'start'),
        endDate: schedulerEndTime(dateParam, 'end'),
        multiEventSelect: true
  )}
 

I don't think this way is a good solution even if it works

// inside scheduler listeners
 timeRangeHeaderDblClick(data) {
            console.log("🚀 ~ file: Planner.tsx ~ line 369 ~ timeRangeHeaderDblClick ~ data", data)
            // to reconfigure the startDate and endDate time again
 }

thankyou


Post by alex.l »

We have a ticket here https://github.com/bryntum/support/issues/965
I've updated it with the information provided.
Please use a workaround you implemented meanwhile.

Thank you!

All the best,
Alex


Post Reply