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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Scheduler: ScrollTo on created with resources

Thread ID:





142767 Feb 18,2019 04:47 PM UTC Feb 20,2019 03:53 AM UTC JavaScript - EJ 2 3
Tags: Schedule
Asked On February 19, 2019 09:07 AM UTC


I'm trying to set the scrollTo time on creation of the schedule object so I have this:

ejs-schedule id="Schedule" ref="scheduleObj" width='100%' height='550px' :created="onCreated" :selectedDate="selectedDate"
                      :eventSettings='eventSettings' :group='group'>
               e-view option="Week"> /e-view>
                e-resource field='ConferenceId' title='Attendees' name='Conferences' :allowMultiple='allowMultiple' :dataSource='resourceDataSource'
                            textField='Text' idField='Id' colorField='Color'>
(< symbols removed)

The onCreated method
onCreated: function(args) {

And the error I get: 
TypeError: Cannot read property 'scrollToHour' of undefined
    at Schedule.scrollTo (schedule.js?67fb:1100)
    at VueComponent.ScheduleComponent.scrollTo (schedule.component.js?7a88:245)
    at VueComponent.onCreated (Calendar2.vue?5052:577)
    at Observer.notify (observer.js?6607:89)
    at Schedule.Base.trigger (base.js?54ff:149)
    at VueComponent.ScheduleComponent.trigger (schedule.component.js?7a88:61)
    at Schedule.Component.appendTo (component.js?02b4:131)
    at VueComponent.ComponentBase.mounted (component-base.js?3cd2:42)
    at callHook (vue.common.js?2371:2923)
    at Object.insert (vue.common.js?2371:4160) 

When I remove the Resources tag the scrolling is working fine. Anyone an idea?

Edit: when I set a Timeout it works:
 onCreated: function(args) {
            const self = this
            setTimeout(function() {
                // In timeout otherwise with resource view it wont work
            }, 500)

Karthigeyan Krishnamurthi [Syncfusion]
Replied On February 19, 2019 10:08 AM UTC

Thank you for contacting Syncfusion support. 
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. 
flag: true, 
onDataBound: function(args) { 
      if (this.flag) { 
        this.flag = false; 

Replied On February 19, 2019 01:45 PM UTC

Thank you Karthigeyan, this is working!

Karthigeyan Krishnamurthi [Syncfusion]
Replied On February 20, 2019 03:53 AM UTC

We are happy that our solution fulfilled your requirement. 


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