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

Scheduler startDate error

Hi,

While routing from one page to another, I am getting below error:

I have assigned all required properties for the Scheduler component.



Regards,
Sonam Diwate

5 Replies

NR Nevitha Ravi Syncfusion Team May 10, 2019 01:54 PM UTC

Hi Sonam, 

Greetings from Syncfusion Support. 

We suspect that dataSource for Scheduler is assigned before the Scheduler is rendered which could cause the reported problem. We suggest you to assign the dataSource to the scheduler in componentDidMount as in the following code. 

componentDidMount() {  
        //assign your dataSource to events variable  
        this.scheduleObj.eventSettings.dataSource = events; 
    }  

Please check whether the above solution works at your end, else please revert us back with the scheduler code snippets to check further on this. 

Regards, 
Nevitha 



SD Sonam Diwate May 14, 2019 12:22 PM UTC

What will be events?





I am getting error in renderer while changing route.
getting error for var start = this.parent.activeView.startDate();


NR Nevitha Ravi Syncfusion Team May 15, 2019 12:48 PM UTC

Hi Sonam, 

Thanks for your update. 

The events variable represents the dataSource collection which is going to be assigned to Scheduler. We have prepared a sample for your reference which can be downloaded from the following link. 

Please check the sample and if the issue persist still try to reproduce it in a sample or share how you have assigned dataSource scheduler. 

Regards, 
Nevitha 



SD Sonam Diwate May 22, 2019 06:26 AM UTC

Could you get some examples to use data using redux state or using reducer action.

This POC is helpfull but in our case we were pulling data from reducer action and maintaining state, and then assigning data to Scheduler


Thanks,
Sonam Diwate


NR Nevitha Ravi Syncfusion Team May 23, 2019 12:56 PM UTC

Hi Sonam, 

Thanks for your update. 

We have prepared a sample in which dataSource has been defined in state, please refer the following sample. 

  constructor(props) { 
    super(props) 
 
    this.setScheduleRef = this.setScheduleRef.bind(this) 
    this.state = { 
      data: [] 
    } 
  } 
 
  componentDidMount() { 
   this.setState({ 
        data: [ 
          { 
            Id: '1', 
            Subject: 'Subject', 
            Description: 'Description', 
            StartTime: moment().toDate(), 
            EndTime: moment().add(30, 'minutes').toDate(), 
            IsAllDay: false 
          } 
      ] }) 
  } 

Please try the sample if the issue persist still, kindly try to reproduce the issue in a sample else share your code snippet to check further on this. 

Regards, 
Nevitha 





Loader.
Live Chat Icon For mobile
Up arrow icon