Using 24 hour time in bootstrap timepicker

前端 未结 15 880
太阳男子
太阳男子 2020-12-03 13:55

Hi im using http://eonasdan.github.io/bootstrap-datetimepicker/ on bootstrap, specifically example number 4.

I added this property to take away the PM thing and be a

相关标签:
15条回答
  • 2020-12-03 14:26

    This works for me:

    $(function () {
        $('#datetimepicker5').datetimepicker({
            use24hours: true,
            format: 'HH:mm'
        });
    });
    

    Important: It only worked at the point I used uppercase "H" as time format.

    0 讨论(0)
  • 2020-12-03 14:29
    //Timepicker
    $(".timepicker").timepicker({
      showInputs: false,
      showMeridian: false //24hr mode 
    });
    
    0 讨论(0)
  • 2020-12-03 14:31

    if you are using bootstrap time picker. use showMeridian property to make the time picker 24 hours format.

    $('.time-picker').timepicker({
                showMeridian: false     
            });
    
    0 讨论(0)
提交回复
热议问题