How do I make the datepicker-bootstrap put the current date by default in the input, I checked in some forums and nothing that they use is jqueri-UI
How do I make the datepicker-bootstrap put the current date by default in the input, I checked in some forums and nothing that they use is jqueri-UI
You assign it directly to the input value or its setDate function
$('.datepicker').datepicker("setDate", new Date());
<link srv="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js"></script>
<input class="datepicker">
Try this example for the current date:
input type="date" name="cumpleanios" step="1" min="2013-01-01"
max="2013-12-31" value="<?php echo date("Y-m-d");?