Disable time in bootstrap date time picker

前端 未结 20 1419
夕颜
夕颜 2021-01-30 07:56

I am using bootstrap date time picker in my web application, made in PHP/HTML5 and JavaScript. I am currently using one from here: http://tarruda.github.io/bootstrap-datetimepic

20条回答
  •  借酒劲吻你
    2021-01-30 08:19

    The selector criteria is now an attribute the DIV tag.

    examples are ...

    data-date-format="dd MM yyyy" 
    data-date-format="dd MM yyyy - HH:ii p
    data-date-format="hh:ii"
    

    so the bootstrap example for dd mm yyyy is:-

    ..... etc ....

    my Javascript settings are as follows:-

                var picker_settings = {
                    language:  'en',
                    weekStart: 1,
                    todayBtn:  1,
                    autoclose: 1,
                    todayHighlight: 1,
                    startView: 2,
                    minView: 2,
                    forceParse: 0
                };
    
            $(datePickerId).datetimepicker(picker_settings);
    

    You can see working examples of these if you download the bootstrap-datetimepicker-master file. There are sample folders each with an index.html.

提交回复
热议问题