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

Default Time of Calendar: View when user comes to the page should move the calendar view such that “Now” is in middle

Thread ID:

Created:

Updated:

Platform:

Replies:

148688 Oct 30,2019 12:00 PM UTC Nov 7,2019 07:05 AM UTC React - EJ 2 7
loading
Tags: Schedule
Sudhanshu Jain
Asked On October 30, 2019 12:00 PM UTC

So when user comes to the scheduler page always current time should be display. As of now when we come to scheduler page, it always show the view from startTime.Let's take if out start time is 8AM and current time is 5pm then when we come to scheduler page 5pm should be display in the middle.How can we do it >??

Karthigeyan Krishnamurthi [Syncfusion]
Replied On October 31, 2019 04:49 AM UTC

 
Syncfusion greetings. 
 
Kindly refer the below UG link to achieve your requirement. 
 
Regards, 
Karthi 
 


Sudhanshu Jain
Replied On November 4, 2019 12:04 PM UTC

Above solution is not working .i have added below method on event "created".
onCreated() {
this.scheduleComponentObj.scrollTo(this.instance.formatDate(new Date(), { skeleton: 'hm' }));
}

It is giving below error .

TypeError: Cannot read property 'scrollToHour' of undefined.

Vinitha Devi Murugan [Syncfusion]
Replied On November 5, 2019 10:27 AM UTC

Hi Sudhanshu, 
 
Syncfusion Greetings. 
 
We tried to reproduce your reported scenario at our end, but scrolling working fine on initial load at our end. We have prepared a sample for your reference which can be available in below link. 
 
 
 onCreated() { 
        this.scheduleObj.scrollTo(this.instance.formatDate(new Date(), { skeleton: 'Hm' })); 
    } 
 
                                                                                                                                               
Regards, 
M.Vinitha devi 


Sudhanshu Jain
Replied On November 5, 2019 11:17 AM UTC

Above same thing i am trying but getting error .Can we setup a call .i have another issue also.so we can discuss and get on the same point .



Vinitha Devi Murugan [Syncfusion]
Replied On November 6, 2019 06:43 AM UTC

Hi Sudhanshu, 
 
Thanks for your update. 
 
We suspect that in your sample you are using the resource. In resource sample, promise will be resolved slower compared to default sample. Therefore, only unable to get the Schedule instance in created event which is the cause for the issue. Kindly use dataBound event as below.  
 
 
onDataBound() { 
        this.scheduleObj.scrollTo(this.instance.formatDate(new Date(), { skeleton: 'Hm' })); 
    } 
 
Regards, 
M.Vinitha devi 


Sudhanshu Jain
Replied On November 6, 2019 11:24 AM UTC

Thanks it is working .You can close the incident .

Vinitha Devi Murugan [Syncfusion]
Replied On November 7, 2019 07:05 AM UTC

Hi Sudhanshu, 
 
You are most welcome 😊 
 
Regards, 
M.Vinitha devi    


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