react-datetime-picker
react-datetime-picker copied to clipboard
Invalid type when using arrow keys to pick values
I get the following error when using the arrow keys to change dates.
Failed prop type: Invalid prop `value` of type `number` supplied to `MinuteInput`, expected `string`.
My onChange function updates a state value which then renders out in the DateTimePicker.
export const DateTimePickerDialog = (props) => {
const [datetime, setDatetime] = useState(props.datetime);
return (
<DateTimePicker
maxDate={props.maxDatetime}
minDate={props.minDatetime}
value={datetime}
onChange={setDatetime}
/>
);
};
I cannot control what values get passed to the child components so is there something im missing?
Same to me, as long as I use keyboard to type in the number, it shows me this warning
Are you using any kind of library to wrap this datepicker? I am using react-hook-form
the only library that would be wrapping it is redux im pretty sure; that is the actual component i copy and pasted
Same to me, as long as I use keyboard to type in the number, it shows me this warning
For me it is no warning it is a full blown error that can cause crashes in an app
the same issue
went ahead and created a PR, hopefully this will resolve the warning
I'm having the same issue...the app can't work !
There's no solution implemented ?
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.