MakingSense / moment-datepicker

[ABANDONED REPOSITORY] The best bootstrap datepicker!
Apache License 2.0
92 stars 64 forks source link

Bug when using datepicker on bootstrap modal dialog #50

Open rposener opened 10 years ago

rposener commented 10 years ago

When you use the datepicker on a form-control within a modal dialog, it incorrectly dismisses the entire dialog.

I updated my source to not trigger the hide event on the source element, which seems to correctly fix this issue. Would really love to see this updated, and the nuget package updated:

hide: function () { this.picker.hide(); $(window).off('resize', this.place); this.viewMode = this.startViewMode; this.showMode(); if (!this.isInput) { $(document).off('mousedown', this.hide); } this.refresh(); // COMMENTED OUT BY Ryan (causes Dialogs to close when shown on dialog) //this.element.trigger({ // type: 'hide' //});