react-datepicker
react-datepicker copied to clipboard
Strange behaviour when dateFormat includes date and time
I made input with dateFormat that includes date and time formats and try to enter date without time.
Expected behavior
Clear input or format with date part of dateFormat
Actual behavior
In cases when dateFormat="dd/MM/yyyy HH:mm:ss" (with slashes) it clears input when dd > 12 and swap date and month when dd < 12.
In cases when dateFormat="dd.MM.yyyy HH:mm:ss" (with dots) it always clears input

Steps to reproduce
react-datepicker v2.0.0
import DatePicker from 'react-datepicker';
...
<DatePicker
id={code}
selected={value}
onChange={(date) => { this.setState({ value: date }); }}
showTimeSelect
timeFormat="HH:mm"
dateFormat="dd/MM/yyyy HH:mm:ss"
/>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.