forked from longbill/jquery-date-range-picker
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
The following two examples illustrate the problem:
moment(moment('19/02/2016', 'DD/MM/YYYY').format('dd, DD. MMM YYYY'), 'dd, DD. MMM YYYY', true).isValid()
// in strict mode, moment won't accept a date formatted and parsed again with the same format specifier
moment('25.01.2016', 'dd, DD. MMM YYYY')
// Will resut in Jan. 25 2001
Since validating user input into input fields is not the job of this library, we have to make sure the user knows exactly which dates he is giving us. Also, only then it will be possible for users to circumvent these issues, because he has control over date parsing