0

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?

2 Answers 2

1

You have onChangeMonthYearType

Change it to this:

onChangeMonthYear: function(year,month,instance) {
        alert("h");
    }
Sign up to request clarification or add additional context in comments.

3 Comments

Check this - api.jqueryui.com/datepicker/#option-onChangeMonthYear. You might be accessing old DOcs. Previous versions
Dunno, now it is indeed showing onChangeMonthYear, but when I saw it previously, it was onChangeMonthYearType!
Yeah. They keep changing the versions.
1

Use onChangeMonthYear not onChangeMonthYearType,

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

Updated Demo

1 Comment

So It is deprecated now i guess

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.