Basically what I’m wanting is my datepicker to echo out the month that it just changed to after selecting a new month. My code is currently:
$(function() {
$('#datepicker').datepicker({
onChangeMonthYear: function () {
$('#date').text("Changed Month to: " + *what to put here*);
}
});
});
I’ve tried everything I can think of, but the only thing I can even get me to return a month is if I get it from the date via $(this).val(), but that only returns me the month of the selected date, whereas I just want to know when the month is changed, and what it was changed to. Any help steering me in the right direction is greatly appreciated.
Use this code this will solve your problem.