Page 1 of 1

[ANGULAR] Scroll To Date With Edge Offset In Rtl

Posted: Wed Mar 22, 2023 12:06 pm
by tomerPlanit

Hi I use scheduler 5.3.1 with angular.

Hi I am trying to move the now date to the view start with some offset.
In "LTR" it works fine but in "Rtl" I get the date not in the offset from the start(for see now you need scroll little to right).

I create you a demo that allow to you change the scheduler direction, show the now by use showCurrentTimeLine, and a button that make the move to now.


Re: [ANGULAR] Scroll To Date With Edge Offset In Rtl

Posted: Wed Mar 22, 2023 4:14 pm
by alex.l

Please adjust your code to use rtl mode with rtl: true as described here viewtopic.php?p=120427#p120427 and test again. Let us know about results please.


Re: [ANGULAR] Scroll To Date With Edge Offset In Rtl

Posted: Thu Mar 23, 2023 11:16 am
by tomerPlanit

Hi Alex,
After the explained changes I got the same problem as explained above.
It is a new demo.


Re: [ANGULAR] Scroll To Date With Edge Offset In Rtl

Posted: Thu Mar 23, 2023 8:02 pm
by alex.l

Hi,

Thank you for updated application.
For RTL direction you need to use reversed offset value.
So this will work well

    now() {
        this.scheduler.scrollToDate(new Date(), { block: 'start', edgeOffset: this.direction === 'rtl' ? -50 : 50 });
    }

Re: [ANGULAR] Scroll To Date With Edge Offset In Rtl

Posted: Sun Mar 26, 2023 2:37 pm
by tomerPlanit

Thanks Alex works perfect