Opened 9 years ago

Closed 9 years ago

#4000 closed bug (wontfix)

Datepicker onChangeMonthYear problem

Reported by: Miroku_87 Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.6rc5
Keywords: onChangeMonthYear page loading Cc: miroku_87@…
Blocked by: Blocking:

Description

Hi everyone, on the site I'm developping I need to refresh my page passing new GET parameters when a user choose a month from my datepicker calendar. Since months label aren't linkable I decided to use the onChangeMonthYear event. The problem is this: this event occures even at the page loading. In my situation, so the fact that I refresh the page when the event occure, I get an infinite loop and that's too bad, 'cause I don't know other way to detect just the month and the year (I don't need the day for now) and I didn't find yet a way to avoid the problem with other systems.

Here is the example page: http://www.phyrosia.com/cose/SCPfansite

Hope this will be useful to you.

Change History (3)

comment:1 Changed 9 years ago by Jörn Zaefferer

Milestone: TBD1.6

comment:2 Changed 9 years ago by rdworth

Milestone: 1.71.8

comment:3 Changed 9 years ago by kbwood

Resolution: wontfix
Status: newclosed

This site doesn't seem to use the datpicker plugin any more.

What you could have done is to not action the refresh until loading/initialisation has finished, via a flag perhaps:

var loading = true; $(function() {

$('#calendario').datepicker({onChangeMonthYear: refreshPage}); loading = false;

});

function refreshPage() {

if (!loading) {

...

}

}

Note: See TracTickets for help on using tickets.