From cdf600b68b43fc59726571540e3d6bc8fe357aa2 Mon Sep 17 00:00:00 2001 From: William Do Date: Tue, 21 Jun 2016 14:13:21 -0700 Subject: [PATCH] fixed #187. Dispatched document click on pickadate. --- src/components/DatePicker/Jquery.DatePicker.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/DatePicker/Jquery.DatePicker.ts b/src/components/DatePicker/Jquery.DatePicker.ts index c45b4fe54..ce80442ee 100644 --- a/src/components/DatePicker/Jquery.DatePicker.ts +++ b/src/components/DatePicker/Jquery.DatePicker.ts @@ -107,6 +107,13 @@ namespace fabric { /** Update the custom view. */ this.updateCustomView($datePicker); + /** dispatch click on document so anything listening can be notified */ + $picker.on("open", function(e) { + let evt = document.createEvent('MouseEvents'); + evt.initEvent("click", true, true); + document.dispatchEvent(evt); + }); + /** Move back one month. */ $monthControls.on("click", ".js-prevMonth", (event) => { event.preventDefault();