$("#res-tab-open").attr("id", "res-tab");
}
});
- var start, extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
+ var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
kids,
function getNights(depart, arrive){
return Math.floor((depart - arrive) / (1000*60*60*24));
}
+ var today = new Date();
+ var dd = today.getDate();
+ var mm = today.getMonth()+1; //January is 0!
+ var yyyy = today.getFullYear();
+
+ if(dd<10) {
+ dd = '0'+dd
+ }
+
+ if(mm<10) {
+ mm = '0'+mm
+ }
+
+ today = yyyy + '-' + mm + '-' + dd;
+ let start = `arrival_date=${today}&`;
$(document).on('change', '#arriveOff', function () {
const _ = $(this);
// offset weird timezone issues by replacing - with /
let year = arrivalDate.getUTCFullYear();
let formattedDate = `${year}-${month}-${day}`;
_.val(formattedDate);
- start = `arrival_date=${formattedDate}&`;
+
// weird date incrementer is the only way in vanilla js to roll over to next month instead of going to 8-32-2018 for example
let minDate = ((new Date(arrivalDate).valueOf() + + 1000*3600*24) > 9) ? (new Date(arrivalDate).valueOf() + + 1000*3600*24) : `0${(new Date(arrivalDate).valueOf() + + 1000*3600*24)}`;
}
-
-
-
// currentDate = $("#arriveOff").val();
// currentDate = new Date(currentDate);
// console.log(currentDate);
$("#res-tab-open").attr("id", "res-tab");
}
});
- var start, extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
+ var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
kids,
function getNights(depart, arrive){
return Math.floor((depart - arrive) / (1000*60*60*24));
}
+ var today = new Date();
+ var dd = today.getDate();
+ var mm = today.getMonth()+1; //January is 0!
+ var yyyy = today.getFullYear();
+
+ if(dd<10) {
+ dd = '0'+dd
+ }
+
+ if(mm<10) {
+ mm = '0'+mm
+ }
+
+ today = yyyy + '-' + mm + '-' + dd;
+ let start = `arrival_date=${today}&`;
$(document).on('change', '#arriveOff', function () {
const _ = $(this);
// offset weird timezone issues by replacing - with /
let year = arrivalDate.getUTCFullYear();
let formattedDate = `${year}-${month}-${day}`;
_.val(formattedDate);
- start = `arrival_date=${formattedDate}&`;
+
// weird date incrementer is the only way in vanilla js to roll over to next month instead of going to 8-32-2018 for example
let minDate = ((new Date(arrivalDate).valueOf() + + 1000*3600*24) > 9) ? (new Date(arrivalDate).valueOf() + + 1000*3600*24) : `0${(new Date(arrivalDate).valueOf() + + 1000*3600*24)}`;
}
-
-
-
// currentDate = $("#arriveOff").val();
// currentDate = new Date(currentDate);
// console.log(currentDate);
Author: Gaslight Media
Author URI: http://www.gaslightmedia.com
Description: A theme for Staffords
-Version: 1.0.50
+Version: 1.0.51
*/