Skip to content

Commit 81ffc34

Browse files
Update DatePicker selects on init (#27)
Prevents the visible datepicker input to be filled but the hidden ones sent to the server being empty, potentially resulting in confusing validation errors
1 parent a0703a1 commit 81ffc34

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webroot/js/app/components/DatePicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ App.Components.DatePickerComponent = Frontend.Component.extend({
7373
}
7474
}.bind(this));
7575

76+
// Initially update selects
77+
this._updateSelects($($selectContainer).parents('.form-group'), $picker.data('DateTimePicker').getMoment(), $picker);
78+
7679
$container.data('datePickerApplied', true);
7780
}.bind(this));
7881
},

0 commit comments

Comments
 (0)