Bootstrap datepicker hide after selection

前端 未结 18 2703
暖寄归人
暖寄归人 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:50

    The problem can be stopped, blocking hide event for input element by this linese:

    var your_options = { ... };
    $('.datetimepicker').datetimepicker(your_options).on('hide', function (e) {
        e.preventDefault();
        e.stopPropagation();
    });

提交回复
热议问题