Bootstrap Datepicker - Months and Years Only

后端 未结 8 1576
逝去的感伤
逝去的感伤 2020-12-02 07:07

I am using bootstrap datepicker and my code is like following, Demo of the code on jsfiddle

8条回答
  •  醉酒成梦
    2020-12-02 08:02

    I am using bootstrap calender for future date not allow with allow change in months & year only..

    var j = jQuery.noConflict();
            j(function () {
                j(".datepicker").datepicker({ dateFormat: "dd-M-yy" }).val()
            });
    
            j(function () {
                j(".Futuredatenotallowed").datepicker({
                    changeMonth: true,
                    maxDate: 0,
                    changeYear: true,
                    dateFormat: 'dd-M-yy',
                    language: "tr"
                }).on('changeDate', function (ev) {
                    $(this).blur();
                    $(this).datepicker('hide');
                }).val()
            });
    

提交回复
热议问题