views:

150

answers:

2

I am using Jquery datepicker plugin and my requirement is I want to allow user to select Month and Year when he click on the Header say 'May 2010'. I want to make the Header say 'May 2010' of datepicker as a link and when he clicks on it, it should display a small div or option to select month and year with Apply and close buttons and when he click on apply the dat picker should change with the selected month and year. Is it possible?

A: 

Maybe you are looking for this: http://jqueryui.com/demos/datepicker/#dropdown-month-year ?

harpax
+1  A: 

jQuery UI's Datepicker has these two options: changeMonth and changeYear

If you set them to true like this...

$('#datepicker').datepicker({
    changeMonth: true,
    changeYear: true
});

... then you will get the functionality you require. See it in action at http://jqueryui.com/demos/datepicker/#dropdown-month-year

EmKay