Unable to provide minDate and maxDate dynamically for schedule

Hi.

I try to use react state to set minDate and maxDate of schedule, then I can change anytime and update my schedule respectively.

However without any React state or useEffect hook, it works great but using react hooks, it will fail. I provide sample code. Maybe sample code is not complete or react useEffect is unnecessary (can removed to simplify code) but In full code of my application, I need it. So please consider providing solution while keeping react useEffect hook.


In my real browser I receiver below error each time however in above sample code, error happen only for first time of view site. (If you use refresh icon in right panel to refresh site):

```
TypeError
_this.activeView is undefined
evaluate/Schedule.prototype.changeDate/</<@https://8uojz.csb.app/node_modules/syncfusion/ej2-schedule/src/schedule/base/schedule.js:500:13
evaluate/Observer.prototype.notify@https://8uojz.csb.app/node_modules/syncfusion/ej2-base/src/observer.js:80:24
evaluate/ComponentBase.prototype.trigger@https://8uojz.csb.app/node_modules/syncfusion/ej2-react-base/src/component-base.js:197:28
evaluate/Schedule.prototype.changeDate/<@https://8uojz.csb.app/node_modules/syncfusion/ej2-schedule/src/schedule/base/schedule.js:498:15
evaluate/Observer.prototype.notify@https://8uojz.csb.app/node_modules/syncfusion/ej2-base/src/observer.js:80:24
...
```

Please help me to solve this problem. Thanks.

5 Replies 1 reply marked as answer

SK Satheesh Kumar Balasubramanian Syncfusion Team June 15, 2021 02:04 PM UTC

Hi Firana,

Thanks for using Syncfusion Products.

We have validated your reported query "Unable to provide minDate and maxDate dynamically for schedule" and confirmed this as defect at our end. So, we have logged the bug report which can be tracked from the following link.


The issue fix for this defect will be included in our volume 2 release which is expected to be rolled out by end of June 2021. We would appreciate your valuable patience until then.

Regards,
Satheesh Kumar B



FB firana bayat June 17, 2021 04:38 AM UTC

Thank you for your review.


NR Nevitha Ravi Syncfusion Team June 17, 2021 12:09 PM UTC

Hi Firana, 

You are most welcome..! please keep track of the issue with the shared feedback link. 

Regards, 
Nevitha 



NR Nevitha Ravi Syncfusion Team July 8, 2021 11:42 AM UTC

Hi Firana, 

Sorry for the inconvenience caused. 

The fix for the reported problem has been rescheduled for the weekly patch release scheduled on July 20th 2021. We appreciate your patience until then. 

Regards, 
Nevitha 



NR Nevitha Ravi Syncfusion Team July 13, 2021 11:07 AM UTC

Hi Firana, 

Thanks for being patience. 

We are glad to announce that our weekly patch release v19.2.47 has been rolled out successfully. The reported bug with updating min and max date dynamically has been fixed in this release. As a result, we recommend you to upgrade to the latest version of our Syncfusion package in order to avail this fix. 


Kindly check the reported defect in the latest version and get back to us if you need any further assistance.  

Regards, 
Nevitha

Marked as answer
Loader.
Up arrow icon