From 97b250fe0f444e7408636f74782db8a55728d4e1 Mon Sep 17 00:00:00 2001 From: Samuell Date: Sun, 4 Mar 2018 12:46:56 +0100 Subject: [PATCH 1/2] feat(MdDatepicker): add close, open events --- src/components/MdDatepicker/MdDatepicker.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/MdDatepicker/MdDatepicker.vue b/src/components/MdDatepicker/MdDatepicker.vue index 25978c6df..391628e8d 100644 --- a/src/components/MdDatepicker/MdDatepicker.vue +++ b/src/components/MdDatepicker/MdDatepicker.vue @@ -84,6 +84,11 @@ toggleDialog () { if (!isFirefox || this.mdOverrideNative) { this.showDialog = !this.showDialog + if (this.showDialog) { + this.$emit('md-opened') + } else { + this.$emit('md-closed') + } } else { this.$refs.input.$el.click() } From f5f17e33ca2ee0e927d0aaba1b65809aac0b2711 Mon Sep 17 00:00:00 2001 From: Samuell Date: Sun, 4 Mar 2018 12:47:25 +0100 Subject: [PATCH 2/2] docs(MdDatepicker): close, open events --- .../pages/Components/Datepicker/Datepicker.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/app/pages/Components/Datepicker/Datepicker.vue b/docs/app/pages/Components/Datepicker/Datepicker.vue index 89ef4fc11..0be648362 100644 --- a/docs/app/pages/Components/Datepicker/Datepicker.vue +++ b/docs/app/pages/Components/Datepicker/Datepicker.vue @@ -32,6 +32,7 @@

All the following options can be applied to the md-datepicker component:

+ @@ -72,6 +73,21 @@ defaults: 'true' } ] + }, + events: { + headings: ['Name', 'Description', 'Value'], + props: [ + { + name: 'md-opened', + description: 'Triggered when a datepicker dialog opens', + value: 'null' + }, + { + name: 'md-closed', + description: 'Triggered when a datepicker dialog closes', + value: 'null' + }, + ] } }) }