From 8a64e29e925893df13a97e913a2ce4d85c776653 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 17 Nov 2015 11:55:10 -0500 Subject: [PATCH] Reverted off canvas calendar back to native html5 date type --- js/app.js | 20 ++++++++++---------- js/custom/pageSetup.js | 20 ++++++++++---------- page-150.php | 3 ++- parts/off-canvas-menu.php | 4 ++-- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/js/app.js b/js/app.js index 5861f76..9ecf1ee 100644 --- a/js/app.js +++ b/js/app.js @@ -64,16 +64,16 @@ $(document).ready(function () { $("#cal2").click(function () { $("#date2").datepicker("show"); }); - $("#offCal1").click(function () { + /*$("#offCal1").click(function () { $("#dateOff1").datepicker("show"); }); $("#offCal2").click(function () { $("#dateOff2").datepicker("show"); - }); + });*/ // $("#dateOff1").val("Arrive"); // $("#dateOff2").val("Depart"); // restrict arrival date ////////////////////////////////////////////// - /* $(document).on('change', '#dateOff1', function () { + $(document).on('change', '#dateOff1', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); @@ -107,9 +107,9 @@ $(document).ready(function () { $("#dateOff2").val(requiredDate); } - });*/ + }); // restrict departure date /////////////////////////////// - /* $(document).on('change', '#dateOff2', function () { + $(document).on('change', '#dateOff2', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); @@ -127,7 +127,7 @@ $(document).ready(function () { if ($("#dateOff2").val() < $('#dateOff2').attr("min")) { // $("#dateOff2").val(requiredDate); } - });*/ + }); $("#date1").datepicker({ minDate: 2, onSelect: function (date) { @@ -138,7 +138,7 @@ $(document).ready(function () { } }); - $("#dateOff1").datepicker({ + /*$("#dateOff1").datepicker({ minDate: 2, onSelect: function (date) { $("#dateOff1").datepicker({dateFormat: 'yy-mm-dd'}).val(); @@ -146,16 +146,16 @@ $(document).ready(function () { nights.setDate(nights.getDate() + 2); $("#dateOff2").datepicker("option", {minDate: new Date(nights)}); } - }); + }); */ //$("#date2").val(requiredDate); $("#date2").datepicker({ onSelect: function (date) { } }); - $("#dateOff2").datepicker({ + /*$("#dateOff2").datepicker({ onSelect: function (date) { } - }); + }); */ }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 1d6158e..172210d 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -55,16 +55,16 @@ $(document).ready(function () { $("#cal2").click(function () { $("#date2").datepicker("show"); }); - $("#offCal1").click(function () { + /*$("#offCal1").click(function () { $("#dateOff1").datepicker("show"); }); $("#offCal2").click(function () { $("#dateOff2").datepicker("show"); - }); + });*/ // $("#dateOff1").val("Arrive"); // $("#dateOff2").val("Depart"); // restrict arrival date ////////////////////////////////////////////// - /* $(document).on('change', '#dateOff1', function () { + $(document).on('change', '#dateOff1', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); @@ -98,9 +98,9 @@ $(document).ready(function () { $("#dateOff2").val(requiredDate); } - });*/ + }); // restrict departure date /////////////////////////////// - /* $(document).on('change', '#dateOff2', function () { + $(document).on('change', '#dateOff2', function () { currentDate = $("#dateOff1").val(); currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); @@ -118,7 +118,7 @@ $(document).ready(function () { if ($("#dateOff2").val() < $('#dateOff2').attr("min")) { // $("#dateOff2").val(requiredDate); } - });*/ + }); $("#date1").datepicker({ minDate: 2, onSelect: function (date) { @@ -129,7 +129,7 @@ $(document).ready(function () { } }); - $("#dateOff1").datepicker({ + /*$("#dateOff1").datepicker({ minDate: 2, onSelect: function (date) { $("#dateOff1").datepicker({dateFormat: 'yy-mm-dd'}).val(); @@ -137,16 +137,16 @@ $(document).ready(function () { nights.setDate(nights.getDate() + 2); $("#dateOff2").datepicker("option", {minDate: new Date(nights)}); } - }); + }); */ //$("#date2").val(requiredDate); $("#date2").datepicker({ onSelect: function (date) { } }); - $("#dateOff2").datepicker({ + /*$("#dateOff2").datepicker({ onSelect: function (date) { } - }); + }); */ }); diff --git a/page-150.php b/page-150.php index 490170c..5d4cf0c 100644 --- a/page-150.php +++ b/page-150.php @@ -19,6 +19,7 @@

+ @@ -31,7 +32,7 @@ } ?> - + diff --git a/parts/off-canvas-menu.php b/parts/off-canvas-menu.php index 3b58fdb..40d81a5 100644 --- a/parts/off-canvas-menu.php +++ b/parts/off-canvas-menu.php @@ -24,11 +24,11 @@
- +
- +
-- 2.17.1