We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting the date and scrollTo

Thread ID:

Created:

Updated:

Platform:

Replies:

145794 Jul 9,2019 03:32 AM UTC Jul 10,2019 05:30 AM UTC Angular - EJ 2 1
loading
Tags: Schedule
Chris Cunningham
Asked On July 9, 2019 03:32 AM UTC

Hi,

I'm trying to make the schedule jump to a particular day and time. I have  [selectedDate]="selectedDate" bound on the Schedule object, and my code does:

        this.selectedDate = newDate;
        this.scheduleObj.scrollTo(newTimeStr);

The problem is that it seems to do things in the wrong order; it updates the time (visible very briefly on the schedule), and then changes the day - which resets the time back to 9am. I assume this is because of Angular's change detection taking a moment to "see" the change to selectedDate, or some task management in Angular or Syncfusion.

Is there any way to make these happen in the correct order, to jump to the correct date and time?

Thanks,
-Chris

Karthigeyan Krishnamurthi [Syncfusion]
Replied On July 10, 2019 05:30 AM UTC

Hi Chris, 
 
Syncfusion greetings. 
 
When changing the Scheduler property, action will be asynchronous which is the cause. Kindly use the below code example to achieve your requirement. 
 
onClick(): void { 
    this.scheduleObj.selectedDate = new Date(); 
    this.scheduleObj.dataBind(); 
    this.scheduleObj.scrollTo(this.scrollTime); 
  } 
 
Regards, 
Karthi 
 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon