diff --git a/src/views/admin/components/metadata-types/date/Date.vue b/src/views/admin/components/metadata-types/date/Date.vue index 644fee4af..d0759cc47 100644 --- a/src/views/admin/components/metadata-types/date/Date.vue +++ b/src/views/admin/components/metadata-types/date/Date.vue @@ -61,10 +61,10 @@ let dateISO = ''; if ($event && $event instanceof Date) - dateISO = moment(this.dateValue, this.dateFormat).toISOString() ? moment(this.dateValue, this.dateFormat).toISOString().split('T')[0] : false; + dateISO = moment(this.dateValue, this.dateFormat).toISOString(true) ? moment(this.dateValue, this.dateFormat).toISOString(true).split('T')[0] : false; else if ($event.target.value && $event.target.value.length === this.dateMask.length) - dateISO = moment(this.dateValue, this.dateFormat).toISOString() ? moment($event.target.value, this.dateFormat).toISOString().split('T')[0] : false; - + dateISO = moment($event.target.value, this.dateFormat).toISOString(true) ? moment($event.target.value, this.dateFormat).toISOString(true).split('T')[0] : false; + if (dateISO == false){ this.isInvalidDate = true; return; @@ -82,11 +82,4 @@ } } } - - - \ No newline at end of file + \ No newline at end of file diff --git a/webpack.common.js b/webpack.common.js index ec41d09b3..29575acac 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -95,7 +95,7 @@ module.exports = { 'PhotoSwipe': 'PhotoSwipe' }), new MomentLocalesPlugin({ - localesToKeep: ['en', 'en-ca', 'en-nz', 'en-gb', 'es-au', 'es-in', 'pt-br', 'pt', 'es', 'es-us', 'es-mx', 'es-do', 'fr', 'fr-ch', 'fr-ca', 'sv'], + localesToKeep: ['en', 'en-ca', 'en-nz', 'en-gb', 'es-au', 'el', 'es-in', 'pt-br', 'pt', 'es', 'es-us', 'es-mx', 'es-do', 'fr', 'fr-ch', 'fr-ca', 'sv'], }) ] }; \ No newline at end of file