From fdc1e83cad28772c8c7e021170e100eec7897839 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 2 Nov 2015 15:05:57 -0500 Subject: [PATCH] Adding more validation to date pickers --- js/app.js | 1 + js/custom/pageSetup.js | 1 + 2 files changed, 2 insertions(+) diff --git a/js/app.js b/js/app.js index b1689c1..2e40abe 100644 --- a/js/app.js +++ b/js/app.js @@ -79,6 +79,7 @@ $(document).ready(function () { $("#dateOff1").change(function () { currentDate = this.value; + currentDate = new Date(currentDate); if (currentDate !== requiredDate) { $("#dateOff1").val(requiredDate); } diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 8938c86..1878389 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -70,6 +70,7 @@ $(document).ready(function () { $("#dateOff1").change(function () { currentDate = this.value; + currentDate = new Date(currentDate); if (currentDate !== requiredDate) { $("#dateOff1").val(requiredDate); } -- 2.17.1