NedStarkOfWinterfell
NedStarkOfWinterfell

Reputation: 5153

jQuery datepicker onChangeMonthYear event not firing

I am trying to build an app based on jQuery date picker. Here is my fiddle: http://jsfiddle.net/Lf6sD/2/. There is a onChangeMonthYear even mentioned in the options, which is supposed to do a simple alert when user changes month or year either through the drop downs or the navigation buttons on the top left and top right.

However, the alert doesn't appear when I am changing month or year either way.

Can anyone tell me what is wrong, and how do I capture the event?

Upvotes: 0

Views: 1762

Answers (2)

Shaunak D
Shaunak D

Reputation: 20626

Use onChangeMonthYear not onChangeMonthYearType,

onChangeMonthYear: function(year,month,instance) {
        alert("h");
}

Updated Demo

Upvotes: 1

jasonwarford
jasonwarford

Reputation: 746

You have onChangeMonthYearType

Change it to this:

onChangeMonthYear: function(year,month,instance) {
        alert("h");
    }

Upvotes: 1

Related Questions