From 78923624c1e1c97a07aae0e201b1e32a38f75206 Mon Sep 17 00:00:00 2001 From: Mario Juarez Date: Sat, 12 Jan 2019 16:33:08 +0100 Subject: [PATCH] Revert split date for being compatible with all locales. So, month picker will be shown when clicking on the date. --- src/DatetimePopup.vue | 17 ++++------------- test/specs/DatetimePopup.spec.js | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/DatetimePopup.vue b/src/DatetimePopup.vue index a64a672..2ca0ab9 100644 --- a/src/DatetimePopup.vue +++ b/src/DatetimePopup.vue @@ -2,7 +2,7 @@
{{ year }}
-
{{ dateFormattedDay }} {{ dateFormattedMonth }}
+
{{ dateFormatted }}
diff --git a/test/specs/DatetimePopup.spec.js b/test/specs/DatetimePopup.spec.js index 965ddf3..3ed4494 100644 --- a/test/specs/DatetimePopup.spec.js +++ b/test/specs/DatetimePopup.spec.js @@ -160,6 +160,25 @@ describe('DatetimePopup.vue', function () { }) }) + it('should render the month picker', function (done) { + const vm = createVM(this, + ``, + { + components: { DatetimePopup }, + data () { + return { + datetime: LuxonDatetime.local() + } + } + }) + + vm.$('.vdatetime-popup__date').click() + vm.$nextTick(() => { + expect(vm.$('.vdatetime-popup__body .vdatetime-month-picker')).to.exist + done() + }) + }) + it('should render the calendar on confirm in year picker', function (done) { const vm = createVM(this, ``,