From: Anthony Talarico Date: Thu, 21 Jan 2016 18:45:21 +0000 (-0500) Subject: restricting depart date selection off canvas booking widget X-Git-Tag: v1.0.0^2~163 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=dae45060addb1ea78df7ad4c7cdaa11247f7a0cb;p=WP-Themes%2Fsaultstemarie.git restricting depart date selection off canvas booking widget --- diff --git a/js/app.js b/js/app.js index aa64c1e..30e0c9b 100644 --- a/js/app.js +++ b/js/app.js @@ -168,7 +168,6 @@ $(document).ready(function () { minDays = $("#arriveOff").attr("min"); $("#arriveOff").val(minDays); } -// $("#departOff").val(minDays); }); // restrict departure date /////////////////////////////// @@ -177,5 +176,8 @@ $(document).ready(function () { currentDate2 = new Date(currentDate2); currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate()); currentDate2.setDate(currentDate2.getDate()); + if($("#departOff").val() < requiredDate){ + $("#departOff").val(minDays); + } }); }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 49dde93..4cb8e60 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -159,7 +159,6 @@ $(document).ready(function () { minDays = $("#arriveOff").attr("min"); $("#arriveOff").val(minDays); } -// $("#departOff").val(minDays); }); // restrict departure date /////////////////////////////// @@ -168,5 +167,8 @@ $(document).ready(function () { currentDate2 = new Date(currentDate2); currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate()); currentDate2.setDate(currentDate2.getDate()); + if($("#departOff").val() < requiredDate){ + $("#departOff").val(minDays); + } }); });