From 2db963ec74c47d6c246d32757e64061018c194de Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 10 Nov 2015 08:53:18 -0500 Subject: [PATCH] Changed off canvas menu from datepicker to html5 date type --- js/app.js | 16 ++++------------ js/custom/pageSetup.js | 16 ++++------------ parts/reservation-form-off-canvas.php | 4 ++-- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/js/app.js b/js/app.js index 0b98e7d..7f03c2b 100644 --- a/js/app.js +++ b/js/app.js @@ -22,20 +22,12 @@ $(document).ready(function () { // Custom js and jquery for staffords /////////////////// // reservation for toggle click function /////////////// - /* $("#res-tab a").on('click', function () { - if ($("#res-tab li ul").css("display") === "none") { - $("#res-tab li ul").css("display", "inherit"); - } else { - $("#res-tab li ul").css("display", "none"); - } - }); */ $("#res-tab a").on('click', function () { if ($("#res-tab").attr("id") === "res-tab") { $("#res-tab").attr("id", "res-tab-open"); } else { $("#res-tab-open").attr("id", "res-tab"); - } - + } }); var start, end, arrival, departure, stay, d, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&', crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&', @@ -44,7 +36,7 @@ $(document).ready(function () { perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&'; ///////off canvas date picker logic ////////////////////////////////////////////// - $("#arriveOff").datepicker({ + /* $("#arriveOff").datepicker({ onSelect: function (date) { $("#arriveOff").datepicker({dateFormat: 'mm/dd/yy'}).val(); arrival = $("#arriveOff").datepicker('getDate'); @@ -73,7 +65,7 @@ $(document).ready(function () { $("#nightsOff").val(departure - arrival); stay = 'stay_nights=' + (departure - arrival) + '&'; } - }); + }); */ ///// end of canvas datepicker logic ^ ////////////////////////////////////////////// /// top bar reservation form dropdown logic //////////////////////////// @@ -92,6 +84,7 @@ $(document).ready(function () { } }); $("#depart").datepicker({ + minDate: new Date(arrival), onSelect: function (date) { $("#depart").datepicker({dateFormat: 'mm/dd/yy'}).val(); departure = $("#depart").datepicker('getDate'); @@ -133,7 +126,6 @@ $(document).ready(function () { } else { } - }); // top bar reservation dropdown button submission ////////////////////////////////////////// $('.res-button').on('click', function () { diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 902613a..1079ab1 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -13,20 +13,12 @@ $(document).ready(function () { // Custom js and jquery for staffords /////////////////// // reservation for toggle click function /////////////// - /* $("#res-tab a").on('click', function () { - if ($("#res-tab li ul").css("display") === "none") { - $("#res-tab li ul").css("display", "inherit"); - } else { - $("#res-tab li ul").css("display", "none"); - } - }); */ $("#res-tab a").on('click', function () { if ($("#res-tab").attr("id") === "res-tab") { $("#res-tab").attr("id", "res-tab-open"); } else { $("#res-tab-open").attr("id", "res-tab"); - } - + } }); var start, end, arrival, departure, stay, d, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&', crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&', @@ -35,7 +27,7 @@ $(document).ready(function () { perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&'; ///////off canvas date picker logic ////////////////////////////////////////////// - $("#arriveOff").datepicker({ + /* $("#arriveOff").datepicker({ onSelect: function (date) { $("#arriveOff").datepicker({dateFormat: 'mm/dd/yy'}).val(); arrival = $("#arriveOff").datepicker('getDate'); @@ -64,7 +56,7 @@ $(document).ready(function () { $("#nightsOff").val(departure - arrival); stay = 'stay_nights=' + (departure - arrival) + '&'; } - }); + }); */ ///// end of canvas datepicker logic ^ ////////////////////////////////////////////// /// top bar reservation form dropdown logic //////////////////////////// @@ -83,6 +75,7 @@ $(document).ready(function () { } }); $("#depart").datepicker({ + minDate: new Date(arrival), onSelect: function (date) { $("#depart").datepicker({dateFormat: 'mm/dd/yy'}).val(); departure = $("#depart").datepicker('getDate'); @@ -124,7 +117,6 @@ $(document).ready(function () { } else { } - }); // top bar reservation dropdown button submission ////////////////////////////////////////// $('.res-button').on('click', function () { diff --git a/parts/reservation-form-off-canvas.php b/parts/reservation-form-off-canvas.php index caed21f..cf7dbc5 100644 --- a/parts/reservation-form-off-canvas.php +++ b/parts/reservation-form-off-canvas.php @@ -9,10 +9,10 @@
- +
- +
-- 2.17.1