This is my datepicker field:
<div class="form-group">
<label for="exampleInputBday">Birthday</label>
<input type="text" name="bday" class="datepicker" required>
</div>
This is my javascript:
$(function(){
$('.datepicker').datepicker({
startDate: '-3y',
'format' : 'mm/dd/yyyy',
autoclose: true
})
})
})
When I open the datepicker, the start date is the current date! How to solve?
This should do the trick. When you are defining the date picker, you can use setDate option:
$(".datepicker").datepicker("setDate", "10/12/2013");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With