How to disable time in Bootstrap DateTimePicker?

I want to use bootstrap datetimepicker without select time, but it does not work. I gave a false value to the pickTime parameter, but it still does not work. But format and language options work.

Here is the code! How can i fix this?

<script type="text/javascript"> $(function () { $('#datetimepicker1').datetimepicker({ format: "dd MM yyyy", pickTime: false, autoclose: true, todayBtn: true, language: 'tr', pickerPosition: "bottom-right" }); }); </script> <div class='input-group date' id='datetimepicker1'> <span class="input-group-addon">Birtdate</span> <input type='text' class="form-control" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"> </span> </span> </div> 
+7
javascript jquery twitter-bootstrap twitter-bootstrap-3 datetimepicker
source share
4 answers

There are many datetimepicker plugins, so you need to find out which plugin you used. If you use the plugin from http://eonasdan.imtqy.com/bootstrap-datetimepicker/ . I think you can use the wrong option: read more at http://eonasdan.imtqy.com/bootstrap-datetimepicker/Options/ . Here I deleted almost and just saved one:

  $('#datetimepicker1').datetimepicker({ format: "dd MM yyyy" }); 
+10
source share

try removing the pickTime option and use minview: 2

 $(function() { $('#datetimepicker4').datetimepicker({ minView : 2 }); }); 
+6
source share

Try the code below, which will only display the date when the calendar is pulled down.

  $(function () { $('#datetimepicker1').datetimepicker({ format: 'yyyy-mm-dd', startView: 'month', minView: 'month', autoclose: true }); }); 
+6
source share

I found this site online, it disables timing

 http://tarruda.imtqy.com/bootstrap-datetimepicker/ <div class="well"> <div id="datetimepicker4" class="input-append"> <input data-format="yyyy-MM-dd" type="text"></input> <span class="add-on"> <i data-time-icon="icon-time" data-date-icon="icon-calendar"> </i> </span> </div> </div> <script type="text/javascript"> $(function() { $('#datetimepicker4').datetimepicker({ pickTime: false }); }); </script> 
+2
source share

All Articles