From 53061ff8f4add5169fd43c591eefaa562d4fb9cf Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 2 Nov 2015 12:54:53 -0500 Subject: [PATCH] min date for html5 not functioning properly --- js/app.js | 10 ++-------- js/custom/pageSetup.js | 10 ++-------- parts/off-canvas-menu.php | 4 ++-- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/js/app.js b/js/app.js index 03c598d..a2770d2 100644 --- a/js/app.js +++ b/js/app.js @@ -79,15 +79,9 @@ $(document).ready(function () { // $("#dateOff1").attr("min", requiredDate); $("#dateOff1").change(function () { - currentDate = this.value; - today = new Date(currentDate); - d = today.getDate() + 2; - m = today.getMonth() + 1; - y = today.getFullYear(); - requiredDate = y + '-' + m + '-' + d; - - + }); + $("dateOff1").validate(); // $("#date1").val(requiredDate); $("#date1").datepicker({ minDate: 2, diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 64b5403..c61265d 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -70,15 +70,9 @@ $(document).ready(function () { // $("#dateOff1").attr("min", requiredDate); $("#dateOff1").change(function () { - currentDate = this.value; - today = new Date(currentDate); - d = today.getDate() + 2; - m = today.getMonth() + 1; - y = today.getFullYear(); - requiredDate = y + '-' + m + '-' + d; - - + }); + $("dateOff1").validate(); // $("#date1").val(requiredDate); $("#date1").datepicker({ minDate: 2, diff --git a/parts/off-canvas-menu.php b/parts/off-canvas-menu.php index 5eef5d7..803fd70 100644 --- a/parts/off-canvas-menu.php +++ b/parts/off-canvas-menu.php @@ -16,8 +16,8 @@ Book Now - - + +