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

Scheduler startDate error

Thread ID:

Created:

Updated:

Platform:

Replies:

144500 May 9,2019 09:14 AM UTC May 23,2019 12:56 PM UTC React - EJ 2 5
loading
Tags: Schedule
Sonam Diwate
Asked On May 9, 2019 09:14 AM UTC

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

Nevitha Ravi [Syncfusion]
Replied On 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 


Sonam Diwate
Replied On 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();

Nevitha Ravi [Syncfusion]
Replied On 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 


Sonam Diwate
Replied On 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

Nevitha Ravi [Syncfusion]
Replied On 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 





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