bootstrap-datetimepicker
bootstrap-datetimepicker copied to clipboard
The DateFormat Bug
If you dateformat is 'yyyy' or others which is only numbers , the number data will cause datetimepicker throw a exception.
Before parse date data, you should judge its number type or not. If it is number type, you should convert it to String type.
Maybe like this.
if(typeof date == 'number'){ date = String(date); }
I insert that code in bootstrap-datetimepicker.js file after parse the data.