Comments (5)
As an update, I have created a code sandbox demonstrating the problem here: https://codesandbox.io/s/event-update-resets-date-2grbbs?file=/src/App.js
The problem only occurs when the state change results in a change to the events parameter. If the state change is unrelated, then the problem does not occur.
from react-scheduler.
Thank you for the sandbox it made it easier. You are right. and there is a history to this #39
it turns out the exposing selectedDate
in this way is not a good solution, so I think I will revert it back, and find another better solution for #39
You can use next release to see this issue fixed
from react-scheduler.
Try v2.5.4
Feel free to reopen if you still find issues
from react-scheduler.
@aldabil21 Thanks, that fixed the issue. One possible solution to both this and #39 is to expose a selectedDate and onDateChange prop. Then the parent component can be notified of when the date changes and update the selected date in their own state. IE make it a controlled field, similar to the value of a MUI TextField.
from react-scheduler.
You are right.
That would work as well.
from react-scheduler.
Related Issues (20)
- Is there a way to set resource to vertical resource orientation HOT 2
- Function(event). Helper function to render custom item in event item HOT 2
- Can't add onClickMore property HOT 1
- Feature request: Disable viewer popper completely HOT 7
- Todos: Recurring Events HOT 3
- allDay events disappear from week view when there are events in the same day
- Invalid Interval error all of a sudden, no changes but my application broke. HOT 3
- Support for date-fns v3 HOT 4
- daylight savings time: wrong event positioning after update HOT 1
- edit event card HOT 1
- wrong event positioning when using portion of hours
- Full Day Event Bug HOT 2
- Getting TypeError: e.start.getTime is not a function when passing the events. HOT 1
- React does not recognize the `disableRipple` prop on a DOM element. HOT 1
- ResourceViewMode tabs, selected resource changed event?
- Wrong events offset HOT 4
- Remote Data not displaying on the Calendar HOT 1
- How to use MUI icons in header title? HOT 1
- How to prevent going to first resource field after onConfirm? HOT 1
- Specify start and end times when 30 minute steps? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-scheduler.