From 828c161c37d84813e8cc368448c25f71cc674c3b Mon Sep 17 00:00:00 2001 From: Arunima George Date: Thu, 28 Nov 2024 14:38:10 +0000 Subject: [PATCH] TD-5080: Issue on 'Enter your start date' screen not allowing to add '0' to date field --- .../Views/Shared/Components/DateInput/Default.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Components/DateInput/Default.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Components/DateInput/Default.cshtml index 341c039ac..b5e869560 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Components/DateInput/Default.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Components/DateInput/Default.cshtml @@ -121,7 +121,7 @@ errorElement.style.visibility = 'hidden'; setTimeout(function () { - if (value < 1 || value > max || !value.match(/^[0-9]*$/)) { + if (value < 0 || value > max || !value.match(/^[0-9]*$/)) { inputElement.value = inputElement.value.slice(0, -1) + 1; inputElement.value = inputElement.value.slice(0, -1); inputElement.setAttribute('aria-invalid', 'true');