开发者

Jquery DatePicker Customization

开发者 https://www.devze.com 2022-12-24 23:25 出处:网络
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 date

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 sh开发者_运维问答ould change with the selected month and year. Is it possible?


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消