Invalid Date Using Moment Javascript And Datetimepicker
This happens using dateTimePicker and moment.js: If I use this line code: console.info($('#inp_date_time_'+value.fila+'_id').val()); print this date format: 04/09/2015 08:31
Solution 1:
Better option would be to specify dateFormat
when creating a moment
object. So replace moment($('#inp_date_time_'+value.fila+'_id').val()).format('YYYY-DD-MM HH:mm:ss');
with moment($('#inp_date_time_'+value.fila+'_id').val(),, 'DD/MM/YYYY HH:mm').format('YYYY-DD-MM HH:mm:ss')
;
Post a Comment for "Invalid Date Using Moment Javascript And Datetimepicker"