Bootstrap 3 DatePicker - How to reset selected date without resetting the picker configuration?
You need to get the current datePicker
instance and call setDate(null)
on it. you can do it like this:
$("#clear").click(function(){
$('#myDatepicker').data('datepicker').setDate(null);
});
updated fiddle: http://jsfiddle.net/4L6fhjLf/2/
$('#myDatepicker').data('DateTimePicker').date(null);