jquery ui datepicker day/month only, not year selection

后端 未结 6 1455
粉色の甜心
粉色の甜心 2020-12-16 16:11

I\'ve searched here in SO and all around but no properly solutions founded for this issue. With jQueryUI DatePicker I need to select a recursive date for all years, so I do

6条回答
  •  -上瘾入骨i
    2020-12-16 16:26

    Simple solution for this :

    $(".daypicker").datepicker( { 
        changeYear: false, 
        dateFormat: 'MM-dd',
    }).focus(function () {
        $(".ui-datepicker-year").hide();
    });
    

    It wont affect to other datepickers in same page.

提交回复
热议问题