From: Anthony Talarico Date: Mon, 2 Nov 2015 20:05:57 +0000 (-0500) Subject: Adding more validation to date pickers X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fdc1e83cad28772c8c7e021170e100eec7897839;p=WP-Themes%2Fglmthemes%2Fbpla-theme.git Adding more validation to date pickers --- 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); }