Bootstrap datepicker how to disable the current date by default

I use pickstrap datetime picker, when we click on the calendar icon, the current dete retrieves to my corresponding input.

Can this be avoided? because I don’t want the current date to be retrieved by default, it should only be selected by the user.

In principle, the calendar should open, but I do not need the default values ​​for input.

Rfer: http://jsfiddle.net/m2fjw57b/45/

HTML:
<div class="input-group date" id='date'>
   <input type='text' class="form-control" />
      <span class="input-group-addon">
      <span class="fa fa-calendar"></span>
   </span>
</div>

JS:
 $(document).ready(function () {
     $('#date').datetimepicker({
         //defaultDate: new Date()
         //date-disabled="now"
         //default: false
     });
 });
+4
source share
1 answer

There is a solution, ideally you just need to disable the current selection.

$(document).ready(function () {$('#date').datetimepicker({useCurrent: false});});

Demo

Greetings

Ashok

+8
source

Source: https://habr.com/ru/post/1621926/


All Articles