Bootstrap datepicker hide after selection

前端 未结 18 2639
暖寄归人
暖寄归人 2020-12-13 01:30

How do I hide the calendar after a date is selected? Is there a specific function that I can use? My code below:

$(\'#dp1\').datepicker({
    format: \'mm-d         


        
18条回答
  •  粉色の甜心
    2020-12-13 01:55

    I changed to datetimepicker and format to 'DD/MM/YYYY'

    $("id").datetimepicker({
        format: 'DD/MM/YYYY',
    }).on('changeDate', function() {
        $('.datepicker').hide();
    });
    

提交回复
热议问题