From 9e375e67126afe26e43170c2472b8326918d1810 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Mon, 4 Jun 2018 09:52:20 +0200 Subject: [PATCH 1/2] Focus only if component has input (3769) --- src/components/date-picker/picker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index 7a5f54cf..4f1b7b18 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -668,7 +668,7 @@ this.reset(); }, focus() { - this.$refs.input.focus(); + this.$refs.input && this.$refs.input.focus(); } }, watch: { From abf60d81384ed840d27cff0a7eb1ccafc0a9ea71 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Thu, 31 May 2018 10:00:14 +0200 Subject: [PATCH 2/2] Use first day of month to avoid getting higher numbers than the month has... (3773) --- src/components/date-picker/panel/Date/date-range.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/date-picker/panel/Date/date-range.vue b/src/components/date-picker/panel/Date/date-range.vue index 0cf6056f..9b925029 100644 --- a/src/components/date-picker/panel/Date/date-range.vue +++ b/src/components/date-picker/panel/Date/date-range.vue @@ -161,7 +161,7 @@ leftPickerTable: `${this.selectionMode}-table`, rightPickerTable: `${this.selectionMode}-table`, leftPanelDate: leftPanelDate, - rightPanelDate: new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, leftPanelDate.getDate()) + rightPanelDate: new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1) }; }, computed: {