The bootstrap datetime picker uses the current client time for
validation, regardless of the field's input value. If minDate lies in
the future, the validation always fails and resets to the minDate value.
As invalid values should never be changed automatically (on the client
side), we add the option "keepInvalid" to the bootstrap datetimepicker
configuration.
Additional fixes:
- The FormEngineValidation was missing the ability to compare range
values of dates. The validateField method now checks for a
DateTimePicker instance and converts the date to a unix timestamp.
- Date fields were initialized multiple times, because the check for
already initialized fields did not work. The reason for this was, that
the datepicker is loaded asynchronously. A dummy DateTimePicker
instance is added, so the check works correctly.
- The min and max date formatting in DateTimePicker.js didn't work for
quite some time, because of changed data attributes in #83240 (834f936).
Besides that, they also weren't needed since that, as it is already
set in the InputDateTimeElement.