Skip to content

Commit

Permalink
fix/reapply changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkithelegendarypokemonster committed Jan 8, 2025
1 parent 7fe2a6a commit c0aaf23
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions js/ui/date_box/ui.date_box.strategy.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@ const NativeStrategy = DateBoxStrategy.inherit({
return displayFormat || dateUtils.FORMATS_MAP[type];
},

renderInputMinMax: function($input) {
renderInputMinMax($input) {
const type = this.dateBox.option('type');
const defaultFormat = 'yyyy-MM-dd';
const format = {
datetime: 'yyyy-MM-ddTHH:mm:ss',
date: defaultFormat,
time: 'HH:mm:ss',
}[type] ?? defaultFormat;

$input.attr({
min: dateSerialization.serializeDate(this.dateBox.dateOption('min'), 'yyyy-MM-dd'),
max: dateSerialization.serializeDate(this.dateBox.dateOption('max'), 'yyyy-MM-dd')
min: dateSerialization.serializeDate(this.dateBox.dateOption('min'), format),
max: dateSerialization.serializeDate(this.dateBox.dateOption('max'), format),
});
}
});
Expand Down

0 comments on commit c0aaf23

Please sign in to comment.