coderex
coderex

Reputation: 27855

jQuery Not to show Year on the Datepicker?

Is it possible not to show the year entry on JQuery UI datepicker?

Now it's shown as Oct 2010, but I just need Oct.

Upvotes: 0

Views: 844

Answers (2)

coder_tim
coder_tim

Reputation: 1720

If you want the year to be seen, but not selectable, you can do something like this:

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

Upvotes: 0

Marko
Marko

Reputation: 72222

Just remove it via CSS, it's probably the simplest solution.

.ui-datepicker-year {
    display: none;
}

Tested and works.

Upvotes: 4

Related Questions