Bootstrap datepicker not close automatically after picking a date

前端 未结 12 1601
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-24 12:41

I use the latest Bootstrap datepicker.js. All works fine except that when I pick a date from the drop down, it does not automatically close it. I searched web and tried to u

12条回答
  •  失恋的感觉
    2020-12-24 13:38

    //10000% work Go to the bootstrap-datepicker.js file

    Search for this:

    'mousedown touchstart': $.proxy(function(e){
                        // Clicked outside the datepicker, hide it
                        if (!(
                            this.element.is(e.target) ||
                            this.element.find(e.target).length ||
                            this.picker.is(e.target) ||
                            this.picker.find(e.target).length
                        )) {
                            this.hide();  //remove this
                        }
                    }, this)
                }]
            ];
        },
    

提交回复
热议问题