Field validation with date picker

If I add a datepicker to a text input, the validation doesn’t work anymore. Is there any possibility to get the automatic field validation working again, without manually checking the field? This is my field:

<input name="end_date" required validate data-validate-on-blur="true" type="text">

And this is the datepicker initialization. The datepicker itself works great, only the input validation doesn’t.

var end_date_calendar = this.$app.calendar.create({
    inputEl: this.$el.find('[name="end_date"]'),
    openIn: 'customModal',
    footer: true,
    toolbarCloseText: __('OK'),
    value: (this.item && this.item.end_date ? [this.item.end_date] : []),
});

It is because input has readonly property, in this case browser validation doesn’t work. Will be fixed in next update

1 Like