Adding more validation to date pickers
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 2 Nov 2015 20:05:57 +0000 (15:05 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 2 Nov 2015 20:05:57 +0000 (15:05 -0500)
js/app.js
js/custom/pageSetup.js

index b1689c1..2e40abe 100644 (file)
--- 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);
         }
index 8938c86..1878389 100644 (file)
@@ -70,6 +70,7 @@ $(document).ready(function () {
     
     $("#dateOff1").change(function () {
         currentDate = this.value;
+        currentDate = new Date(currentDate);
         if (currentDate !== requiredDate) {
             $("#dateOff1").val(requiredDate);
         }