jQuery Calender: Include month and year dropdown

By | December 26, 2013

As you have seen how to add a simple jQuery calender in your project, Now think about enhancement. A jQuery Calender have much more predefined function. Here I am going to explain how to add month and year drop down in jQuery Calender so user can move one to another month or year directly instead of next/previous button.

calender-month-year

It’s pretty simple to add month or year in a calender. You just need to pass parameter for showing month and year drop down.

jQuery(‘.calender’).datepicker({
changeMonth : true,
chanagYear : true
})

If you want to show only month then add only changeMonth:true and vice versa.

A full example code:

Leave a Reply

Your email address will not be published. Required fields are marked *