onChangeMonthYear and inline datepicker
hi,
i have an inline datepicker with the following options:
$('#options #date').datepicker({
minDate: 0,
maxDate: "+2Y",
regional: $('html').attr('lang'),
changeMonth: true,
changeYear: true,
showOtherMonths: true,
hideIfNoPrevNext: true,
dateFormat: 'yy-mm-dd',
defaultDate: new Date($('ul.events li:first span.date').attr
('title')),
beforeShowDay: highlightEventDates,
onSelect: showEventsOnDate,
onChangeMonthYear: showEventsFromMonth
});
The problem:
it seems like the onChangeMonthYear event is fired inmediatly as the
page loads, not only when the dropdown is changed. my function
showEventsFromMonth() changes the window.location.href and now the
page always will be reloaded.
to make it clear, i want to change the window.location.href, when the
user changes the month or the year dropdown in the datepicker, not
when the page loads.
Does anybody have an idea how to achieve this?
thanks