From: Anthony Talarico Date: Tue, 14 Aug 2018 17:08:19 +0000 (-0400) Subject: fixing syntax error in the off canvas reservation widget departure time X-Git-Tag: v1.0.50^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=c7546b7e75e8f0fec1e01772f0c2bcf29940999a;p=WP-Themes%2Fstaffords.git fixing syntax error in the off canvas reservation widget departure time --- diff --git a/js/app.js b/js/app.js index db64f14..d7ecbef 100644 --- a/js/app.js +++ b/js/app.js @@ -131,7 +131,8 @@ $(document).ready(function () { let formattedDate = `${year}-${month}-${day}`; _.val(formattedDate); let arrivalDate = new Date($("#arriveOff").val()); - if( !isNaN( getNights(departDate,arrivalDate) ) && !getNights(departDate,arrivalDate) < 0){ + + if( !isNaN( getNights(departDate,arrivalDate) ) && !getNights(departDate,arrivalDate) < 1){ $("#nightsOff").val( getNights(departDate,arrivalDate) ) stay = `stay_nights=${getNights(departDate,arrivalDate)}&`; }else { diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 695a86c..995005b 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -122,7 +122,8 @@ $(document).ready(function () { let formattedDate = `${year}-${month}-${day}`; _.val(formattedDate); let arrivalDate = new Date($("#arriveOff").val()); - if( !isNaN( getNights(departDate,arrivalDate) ) && !getNights(departDate,arrivalDate) < 0){ + + if( !isNaN( getNights(departDate,arrivalDate) ) && !getNights(departDate,arrivalDate) < 1){ $("#nightsOff").val( getNights(departDate,arrivalDate) ) stay = `stay_nights=${getNights(departDate,arrivalDate)}&`; }else { diff --git a/style.css b/style.css index 679e899..f346625 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Staffords Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for Staffords -Version: 1.0.49 +Version: 1.0.50 */