0.0.120 error message for wrong data in arrival
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user