Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #677 from OfficeDev/wdo360/#187-datepicker-click-b…
Browse files Browse the repository at this point in the history
…ubbling

fixed #187. Dispatched document click on pickadate.
  • Loading branch information
Mike Wheaton authored Jun 22, 2016
2 parents 3013115 + 1c12a0c commit aa1d43b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/DatePicker/Jquery.DatePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit aa1d43b

Please sign in to comment.