react-bootstrap-datetimepicker
react-bootstrap-datetimepicker copied to clipboard
allow empty or invalid initial date
This will allow the user to pass in an invalid date. The viewDate will be initialised to the current month. The inputValue will be initialised to empty string. The selectedDate property will stay invalid (no date selected) until either the user selects a date or toggles the time picker, at which point the date picker will be initialised to the current date and time. Also fixed the AM/PM switch adding 12 hours instead of subtracting when you switch from 12:xx noon to midnight. This merge should fix issues #159 #148 and #100.
This PR really need to be merged ! I'm having the same issue with empty date and I cannot apply some validation on it since it's always returning "Invalid date".
I've grabbed those changes and they're working really well. Thanks @djonin
what about a merge? :)
This project seems to be dead, so your best option is probably to clone it and apply your changes (or to look for another datepicker, ahem).
Please see https://github.com/YouCanBookMe/react-datetime