Move data fetching code or side effects to componentDidUpdate.
If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.
Please update the following components: Calendar, Day, Month, ReactSlider, Time, Year
I currently use "Picker" with minPanel prop to allow to display the component to select only years or months.
I have 2 issues with the actual implementation :
I cannot close the panel when my selection is done (closeOnSelectDay prop works only if dayPanel is the current one)
onChange is triggered each time I display a panel, even if the user does not make selection at all (ex navigatiin in years)
I propose to take care of the minPanel option to trigger change only when the min panel is the current one, and evaluate "closeOnSelect" under this condition.
Below is a diff of a possible implementation.
Are you open to a PR about this ?
Looking at your demo page, ( https://allenwooooo.github.io/rc-datetime-picker/ ) the default state of the hour/min sliders is 0/0 even if the time is set. Do you have a resolution/work-around for this?
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /home1/irteam/.jenkins/jobs/NFAS_WEB_ND/workspace/node_modules/rc-datetime-picker/dist
In parent component, when i click outside input DatetimePickerTrigger auto close, but in child component(that is a modal boostrap), i using DatetimePickerTrigger but when i click outside DatetimePickerTrigger not close. Anyone can help me ? thanks
In addition to the current minDate and maxDate, it would be most welcome if the library also supported a minTime and maxTime. For example to disable reservations in the evenings.
I like the library very much, but using moment.js was a problem for us, so I made the project work with dayjs. I did not create a fork and open a Pull request because the two projects will proceed differently than each other. Also, this place has not been receiving updates for a long time.
In Popup Mode example: https://allenwooooo.github.io/rc-datetime-picker/
When we clear the date (with the Clear button), and then we want to set new date, date will not be set until we will set time. This is confusing, because naturally I firstly click on calendar day, then nothing happens, and then I use time picker and have to use calendar once more.