diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 515d1bf..e4403ea 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -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; diff --git a/templates/blocks/profile/b_new_route.html b/templates/blocks/profile/b_new_route.html index cd44ee8..b842e6f 100644 --- a/templates/blocks/profile/b_new_route.html +++ b/templates/blocks/profile/b_new_route.html @@ -76,7 +76,7 @@ {% endif %} -
+