如何获取UI-Datepicker月份更改事件

时间:2018-06-20 12:38:54

标签: jquery jquery-ui-datepicker bootstrap-datepicker

enter image description here

代码:

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

如何获取月份和年份更改事件?

1 个答案:

答案 0 :(得分:0)

$(function() {
        $("#businessDatepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            onChangeMonthYear: function () {
                alert('y');
            }
        });
    });