From: Anthony Talarico Date: Tue, 10 Nov 2015 16:43:59 +0000 (-0500) Subject: removing auto set for departure date X-Git-Tag: v1.0.0^2~304 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6f1ddb548fd0905792bab118fc395ff838f18413;p=WP-Themes%2Fstaffords.git removing auto set for departure date --- diff --git a/js/app.js b/js/app.js index 368a6b0..9b0709a 100644 --- a/js/app.js +++ b/js/app.js @@ -105,14 +105,15 @@ $(document).ready(function () { departure = departure.replace(/\//g, ""); departure = parseInt(departure, 10); stay = (departure - arrival); - if (stay <= 0) { + alert(stay); + if (stay < 0) { stay = 0; } else { $("#nightsOff").val(departure - arrival); } stay = 'stay_nights=' + (departure - arrival) + '&'; if ($("#departOff").val() < $('#departOff').attr("min")) { - $("#departOff").val(requiredDate); + // $("#departOff").val(requiredDate); } }); ///// end of canvas datepicker logic ^ ////////////////////////////////////////////// diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 3c30188..5d096b3 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -96,14 +96,15 @@ $(document).ready(function () { departure = departure.replace(/\//g, ""); departure = parseInt(departure, 10); stay = (departure - arrival); - if (stay <= 0) { + alert(stay); + if (stay < 0) { stay = 0; } else { $("#nightsOff").val(departure - arrival); } stay = 'stay_nights=' + (departure - arrival) + '&'; if ($("#departOff").val() < $('#departOff').attr("min")) { - $("#departOff").val(requiredDate); + // $("#departOff").val(requiredDate); } }); ///// end of canvas datepicker logic ^ //////////////////////////////////////////////