I was looking for a solution to the same problem and, relying on the help I got here, I came across a simpler solution regarding switching the date picker. I know that a lot of time has passed since this question was created, but I will leave it here anyway, in case someone has a similar problem in the future.
$("#datepicker").datepicker();
$("#datepicker").mousedown(function() {
$('.datepicker-dropdown').toggle();
});
source
share