Emre BEGEN Emre BEGEN - 1 year ago 318
jQuery Question

How to disable time in Bootstrap DateTimePicker?

I wanna use bootstrap datetimepicker without select time but it is not working. I gave false value to the pickTime parameter but it is still not working. But Format and language parameters is working.

Here is the code!
How can i fix this?

<script type="text/javascript">
$(function () {
format: "dd MM yyyy",
pickTime: false,
autoclose: true,
todayBtn: true,
language: 'tr',
pickerPosition: "bottom-right"

<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>

Answer Source

There are many datetimepicker plugin, so you need to details what plugin you used. If you use the plugin from http://eonasdan.github.io/bootstrap-datetimepicker/. I think, you may use wrong its option : read more at http://eonasdan.github.io/bootstrap-datetimepicker/Options/. Here I removed almost, and just keep one:

        format: "dd MM yyyy"         
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download