smalot / bootstrap-datetimepicker

Both Date and Time picker widget based on twitter bootstrap (supports Bootstrap v2 and v3)
http://www.malot.fr/bootstrap-datetimepicker/
Apache License 2.0
3.49k stars 1.65k forks source link

format should accept Moment.js format, even though not a dependency #731

Open patarapolw opened 6 years ago

patarapolw commented 6 years ago

It is a bit weird when I use both Moment.js format and your format differently, even though it show exactly the same format!

  $('#input-created')
    .val(moment().subtract(1, 'days').format('YYYY-MM-DD HH:00'))
    .datetimepicker({
      format: 'yyyy-mm-dd hh:00',
      todayBtn: true,
      todayHighlight: true,
      autoclose: true,
      minView: 'day',
      showMeridian: true
    })
    .change(function(){
      doSubmit();
    });

After all, it just couldn't use this one -- https://github.com/Eonasdan/bootstrap-datetimepicker nor this one https://github.com/tempusdominus/bootstrap-3 -- it shows an empty dialog.

YassineElHosni commented 6 years ago

this one works fine for me