Matt
Matt

Reputation: 21

Datepicker with jQuery

I once saw a datepicker where the month and year where in 1 (and the same) select box, how do I do this (with options/hardcoding) The css file also gives a clue of this possibility (select.ui-datepicker-month-year) so does anybody know the answer ?

And also, I know you can show the first/last days of the next/previous month as well, but these are standard not selectable, it is possible to make these selectable? (How?)

Thanks in advance.

Upvotes: 2

Views: 379

Answers (1)

Nick Craver
Nick Craver

Reputation: 630627

The jQuery UI Site has these examples for you, with complete code as well: Display month & year menus

Basically it boils down to a few options set on the date picket:

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

Upvotes: 2

Related Questions