Como se mencionó isJustMe esto es sólo la manera de hacerlo. Aquí hay una versión con un pequeño complemento que me parece bastante útil. Si hace clic en los días del mes siguiente o anterior del selector de fecha cambia automáticamente a ese mes:
jQuery('#datepicker').datepicker({
showOtherMonths: true,
selectOtherMonths: true,
onSelect: function(string, element) {
// Change month on click on other days
var day = element.selectedDay;
var mon = element.selectedMonth;
var year = element.selectedYear;
var target = jQuery(element.dpDiv).find('[data-year="'+year+'"][data-month="'+mon+'"]').filter(function() {
return jQuery(this).text().trim() == day;
});
if(target.hasClass('ui-datepicker-other-month')) {
if(parseInt(target.text().trim()) > 15) {
jQuery(element.dpDiv).find('.ui-datepicker-prev').click();
} else {
jQuery(element.dpDiv).find('.ui-datepicker-next').click();
}
}
},
});
Aquí un poco de agradecimiento a adeneo and his answer para conseguir el elemento actual.