Skip to content

Commit 26152cb

Browse files
committed
Date format not respected in date ui component
1 parent 0e5eee4 commit 26152cb

File tree

1 file changed

+7
-9
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element

1 file changed

+7
-9
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/date.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,13 @@ define([
187187
* with moment.js library.
188188
*/
189189
prepareDateTimeFormats: function () {
190-
// Respect explicitly configured picker format if provided; otherwise compose from options.
191-
if (!this.pickerDateTimeFormat) {
192-
if (this.options.timeOnly) {
193-
this.pickerDateTimeFormat = this.options.timeFormat;
194-
} else {
195-
this.pickerDateTimeFormat = this.options.dateFormat;
196-
if (this.options.showsTime) {
197-
this.pickerDateTimeFormat += ' ' + this.options.timeFormat;
198-
}
190+
if (this.options.timeOnly) {
191+
this.pickerDateTimeFormat = this.options.timeFormat;
192+
} else {
193+
this.pickerDateTimeFormat = this.options.dateFormat;
194+
195+
if (this.options.showsTime) {
196+
this.pickerDateTimeFormat += ' ' + this.options.timeFormat;
199197
}
200198
}
201199

0 commit comments

Comments
 (0)