From: Anthony Talarico Date: Tue, 17 Nov 2015 17:15:23 +0000 (-0500) Subject: fixed departure date from not being restricted X-Git-Tag: v1.0.0^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=710540b5c3b7f04f14d8b2be1ffc413352377471;p=WP-Themes%2Fbpla.git fixed departure date from not being restricted --- diff --git a/js/app.js b/js/app.js index 9ecf1ee..1ab6119 100644 --- a/js/app.js +++ b/js/app.js @@ -55,8 +55,7 @@ $(document).ready(function () { $("#head-img").remove(); } - // save guest input - + // date picker images for each calendar $("#cal1").click(function () { $("#date1").datepicker("show"); @@ -72,7 +71,9 @@ $(document).ready(function () { });*/ // $("#dateOff1").val("Arrive"); // $("#dateOff2").val("Depart"); - // restrict arrival date ////////////////////////////////////////////// + + + // restrict arrival date off canvas ////////////////////////////////////////////// $(document).on('change', '#dateOff1', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); @@ -105,6 +106,7 @@ $(document).ready(function () { y = currentDate.getFullYear(); requiredDate = y + '-' + m + '-' + d; $("#dateOff2").val(requiredDate); + } }); @@ -125,7 +127,7 @@ $(document).ready(function () { y = currentDate.getFullYear(); requiredDate = y + '-' + m + '-' + d; if ($("#dateOff2").val() < $('#dateOff2').attr("min")) { - // $("#dateOff2").val(requiredDate); + $("#dateOff2").val(requiredDate); } }); $("#date1").datepicker({ diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 172210d..50ac07a 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -46,8 +46,7 @@ $(document).ready(function () { $("#head-img").remove(); } - // save guest input - + // date picker images for each calendar $("#cal1").click(function () { $("#date1").datepicker("show"); @@ -63,7 +62,9 @@ $(document).ready(function () { });*/ // $("#dateOff1").val("Arrive"); // $("#dateOff2").val("Depart"); - // restrict arrival date ////////////////////////////////////////////// + + + // restrict arrival date off canvas ////////////////////////////////////////////// $(document).on('change', '#dateOff1', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); @@ -96,6 +97,7 @@ $(document).ready(function () { y = currentDate.getFullYear(); requiredDate = y + '-' + m + '-' + d; $("#dateOff2").val(requiredDate); + } }); @@ -116,7 +118,7 @@ $(document).ready(function () { y = currentDate.getFullYear(); requiredDate = y + '-' + m + '-' + d; if ($("#dateOff2").val() < $('#dateOff2').attr("min")) { - // $("#dateOff2").val(requiredDate); + $("#dateOff2").val(requiredDate); } }); $("#date1").datepicker({