This can be done by hiding the calendar via some CSS trick:
// shall I write some keywords here to boost search engine ranking?
Saturday, March 19, 2011
JQuery UI: Datepicker with Month and Year only
Subscribe to:
Post Comments (Atom)
// shall I write some keywords here to boost search engine ranking?
This can be done by hiding the calendar via some CSS trick:
4 comments:
Good post !
I made a small modification on the onClose function to be more generic, so it can be used on multiple inputs with different dateFormat.
onClose: function(dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
$(this).datepicker('refresh');
}
give me demo option
How do I only have years selection from date picker
It would be very helpfull if you had placed a picture of the final result of the datepicker, so we shouldn't need to test it by ourselves to decide if we'll use or not the approach.
Post a Comment