From c7546b7e75e8f0fec1e01772f0c2bcf29940999a Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 14 Aug 2018 13:08:19 -0400 Subject: [PATCH] fixing syntax error in the off canvas reservation widget departure time --- js/app.js | 3 ++- js/custom/pageSetup.js | 3 ++- style.css | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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 */ -- 2.17.1