From 442dc339dd16e9ae415d7058a5d08f5b017d3e3a Mon Sep 17 00:00:00 2001 From: swarnadipa-dev Date: Tue, 3 Sep 2024 20:32:28 +0530 Subject: [PATCH] fixed lint issue --- ui/widgets/nuxeo-date-picker.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/widgets/nuxeo-date-picker.js b/ui/widgets/nuxeo-date-picker.js index a0f31c071..0b8763595 100644 --- a/ui/widgets/nuxeo-date-picker.js +++ b/ui/widgets/nuxeo-date-picker.js @@ -195,12 +195,14 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js'; moment.locale(window.nuxeo.I18n.language ? window.nuxeo.I18n.language.split('-')[0] : 'en'); // tell vaadin-date-picker how to display dates since default behavior is US locales (MM-DD-YYYY) // this way we can take advantage of moment locale and use the date format that is most suitable for the user - // const convertedFormat = this.format ? this.format : moment.localeData().longformat('L'); - this.$.date.set('i18n.formatDate', (date) => this._moment(date).format(this.format ? this.format : moment.localeData().longDateFormat('L'))); - // this.$.date.set('i18n.formatDate', (date) => this._moment(date).format(convertedFormat)); + // const convertedFormat = this.format ? this.format : moment.localeData().longformat('L'); + this.$.date.set('i18n.formatDate', (date) => + this._moment(date).format(this.format ? this.format : moment.localeData().longDateFormat('L')), + ); + // this.$.date.set('i18n.formatDate', (date) => this._moment(date).format(convertedFormat)); this.$.date.set('i18n.parseDate', (text) => { - // const date = this._moment(text, convertedFormat); - const date = this._moment(text, this.format ? this.format : moment.localeData().longDateFormat('L')); + // const date = this._moment(text, convertedFormat); + const date = this._moment(text, this.format ? this.format : moment.localeData().longDateFormat('L')); return { day: date.get('D'), month: date.get('M'),