Skip to content

Commit

Permalink
ELEMENTS-1113: expose date-format prettier formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
swarnadipa-dev committed Oct 24, 2024
1 parent 0f72414 commit 885ff53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/widgets/nuxeo-date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';
// 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
this.$.date.set('i18n.formatDate', (date) =>
this._moment(date).format(this.format ? this.format : moment.localeData().longDateFormat('L')),
);
this._moment(date).format(this.format ? this.format : moment.localeData().longDateFormat('L')),
);
this.$.date.set('i18n.parseDate', (text) => {
const date = this._moment(text, this.format ? this.format : moment.localeData().longDateFormat('L'));
return {
Expand Down

0 comments on commit 885ff53

Please sign in to comment.