0.0.120 error message for wrong data in arrival

This commit is contained in:
2023-08-29 17:53:40 +03:00
parent e97d52d8a7
commit 3312b825fc
2 changed files with 9 additions and 2 deletions

View File

@@ -601,9 +601,16 @@ function checkDate() {
var DateEnd = new Date(dateArrival.value);
if (DateEnd < DateStart) {
alert("End date cannot be less than Start date.");
// alert("End date cannot be less than Start date.");
dateArrival.value = ""
let arrivalDiv = document.getElementById('arrival_div')
let errorMessage = document.createElement('span');
errorMessage.textContent = "Дата прибытия, не может быть установлена раньше даты отправки"
errorMessage.classList.add('errorlist')
arrivalDiv.appendChild(errorMessage);
}
return true;

View File

@@ -76,7 +76,7 @@
{% endif %}
</div>
<div>
<div id="arrival_div">
<label for="id_arrival_DT">{{ form.fields.arrival_DT.label }}</label>
<input
type="datetime-local"