-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FOUR-6854 Added the extent of DatePick library
* Fixed the date prop value to check if the value exist, to parse it. IF not, default to empty string
- Loading branch information
1 parent
c3da2c3
commit 90ee227
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script> | ||
import DatePick from "vue-date-pick"; | ||
/* | ||
Internal fork of the DatePick library by extending it and fixing the {close,remove} events to target the b-modal | ||
(Bootstrap-Vue) modals to not "focus-in" automatically on the input text. | ||
*/ | ||
export default { | ||
extends: DatePick, | ||
methods: { | ||
addCloseEvents() { | ||
if (!this.closeEventListener) { | ||
this.closeEventListener = (e) => this.inspectCloseEvent(e); | ||
["click", "keyup"].forEach((eventName) => | ||
document.addEventListener(eventName, this.closeEventListener) | ||
); | ||
} | ||
}, | ||
removeCloseEvents() { | ||
if (!this.closeEventListener) { | ||
this.closeEventListener = (e) => this.inspectCloseEvent(e); | ||
["click", "keyup"].forEach((eventName) => | ||
document.addEventListener(eventName, this.closeEventListener) | ||
); | ||
} | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters