Premium support for our pure JavaScript UI components


Post by EarlyHost »

Hi folks,

I have an issue with scrollToNow or scrollToDate function of the scheduler component.

const scheduler = new Scheduler({
    appendTo         : 'container',
    resources,
    events,
    startDate        : new Date(2017, 0, 1, 6),
    endDate          : new Date(2017, 0, 1, 20),
    viewPreset       : 'hourAndDay',
    rowHeight        : 50,
    barMargin        : 5,
    multiEventSelect : true,
    columns          : [
        { text : 'Name', field : 'name', width : 130 }
    ],
tbar:[
      {
        type: "button",
        ref: "today",
        color: "b-rounded b-raised",
        icon: 'b-fa b-fa-compress-arrows-alt',
        onClick: () => scheduler.scrollToNow( { block: "center", animate: true, highlight: true, extendTimeAxis:false })
      },

]
});

This repro is a modified Basic example. Timespan 06.01.2017 to 20.06.2017. Clicking on the button focus 15.03.2024 which is out of timerange.

Do i missunderstand something or is it a bug?

regards


Post by marcio »

Hey EarlyHost,

Thanks for reaching out.

That's how scrollToNow is supposed to work. What's the expected behavior on your side?

Best regards,
Márcio


Post by EarlyHost »

marcio wrote: Fri Mar 15, 2024 8:19 pm

Hey EarlyHost,

That's how scrollToNow is supposed to work. What's the expected behavior on your side?

In scrollConfig the extendTimeAxis is set to false. So i expected, according to documentation, no scrolling beyond the end of the timeaxis.


Post by marcio »

Hey,

Oh, sorry, my mistake, I didn't notice the extendTimeAxis config. Looks like a bug, I created a ticket to fix that https://github.com/bryntum/support/issues/8822

Best regards,
Márcio


Post Reply