There is a form http://joxi.ru/V2VR3GvS0334N2 , where in the “Date and time” field, the Bootstrap 3 Datepicker calendar is used to select the date (link to the plugin https://eonasdan.imtqy.com/bootstrap-datetimepicker/ ). The choice of date is as follows http://joxi.ru/LmGqn7pFR339jA
The date limit is set; you can only select a date 8 days later than the current one. When choosing a time, a problem arises, if you choose a time before the date (you click on the clock first http://joxi.ru/EA4n4abhDePpMm ), then the field with the date is cleared. How to make it not clean? Is it possible to make the second option so that the user cannot choose the time until the moment he chooses the date?
The error looks like this: http://joxi.ru/KAg7BEJhgvRpbA when clicking on the timing arrow, the value in the field is cleared and time itself cannot be changed either. As I understand it, the error is related to the minDate parameter, if you comment it, it does not occur.
Code:
$('#Date').datetimepicker({ language: 'ru', format: "YYYY-MM-DD HH:00", minDate:moment().add(2, 'days') });