After selecting a date using the method, you need to update to get the selected date in . setDatedatepickerdatepicker
Before:

$('#datepicker').datepicker('setDate', new Date(2011, 2, 5));
$('#datepicker').datepicker('update');
Finally:

source
share