From: Anthony Talarico Date: Thu, 28 Jul 2016 19:53:56 +0000 (-0400) Subject: adjusted submit button style for off canvas booking widget, fixed bug with departure... X-Git-Tag: v1.0.0^2~233 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b33e89d0ce49b0325c026d7c3458a6740a088268;p=WP-Themes%2Fpetoskeyarea.git adjusted submit button style for off canvas booking widget, fixed bug with departure date not recognizing minDate --- diff --git a/css/app.css b/css/app.css index 733ae34..9879750 100644 --- a/css/app.css +++ b/css/app.css @@ -7772,7 +7772,7 @@ aside.right-off-canvas-menu #resform-wrapper #jrs_calendar_form { width: 100%; } aside.right-off-canvas-menu #resform-wrapper #jrs_calendar_form #widget_booking_form #jrs_search_submit { float: right; - margin: 0 20%; + margin: 0 50%; background: #73BF45; border: 1px solid #73BF45; } aside.right-off-canvas-menu #resform-wrapper #jrs_calendar_form #widget_booking_form #jrs_search_submit input { diff --git a/js/app.js b/js/app.js index d03ba61..804b4df 100644 --- a/js/app.js +++ b/js/app.js @@ -86,26 +86,38 @@ $(document).ready(function () { } }); - $(off_canvas_departure).datepicker({ - beforeShow: function (input, inst) { - setTimeout(function () { - inst.dpDiv.css({ - top: 100, - left: 50 - }); - }, 0); - } - }); - + + var depart_min, min_date, y, m, d; $(off_canvas_arrival).change( function () { - var min_date = $(this).datepicker('getDate', '+1d'); + + min_date = $(this).datepicker('getDate', '+1d'); min_date.setDate(min_date.getDate() + 1); +// d = min_date.getDate(); +// if (d <= 9) { +// d = '0' + d; +// } +// m = min_date.getMonth() + 1; +// +// y = min_date.getFullYear(); +// depart_min = new Date(y, m - 1, d); +// console.debug(depart_min); $(off_canvas_departure).datepicker('setDate', min_date); - }); - - $(off_canvas_departure).datepicker({ + $(off_canvas_departure).datepicker('option','minDate', min_date ); + // set departure mindate and change datepicker position when arrival is selectes }); + $(off_canvas_departure).datepicker({ + beforeShow: function (input, inst) { + setTimeout(function () { + inst.dpDiv.css({ + top: 100, + left: 50 + }); + }, 0); + } + }); + + $("header").find('ul').find('li').children('a').on("click", function (){ if($(".searchform").css("display") === "none"){ @@ -117,7 +129,6 @@ $(document).ready(function () { }); } - }); var start_date = $(".reservation-front").find("#start-date"); var end_date = $(".reservation-front").find("#end-date"); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 8c4cd51..cdc5e6b 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -77,26 +77,38 @@ $(document).ready(function () { } }); - $(off_canvas_departure).datepicker({ - beforeShow: function (input, inst) { - setTimeout(function () { - inst.dpDiv.css({ - top: 100, - left: 50 - }); - }, 0); - } - }); - + + var depart_min, min_date, y, m, d; $(off_canvas_arrival).change( function () { - var min_date = $(this).datepicker('getDate', '+1d'); + + min_date = $(this).datepicker('getDate', '+1d'); min_date.setDate(min_date.getDate() + 1); +// d = min_date.getDate(); +// if (d <= 9) { +// d = '0' + d; +// } +// m = min_date.getMonth() + 1; +// +// y = min_date.getFullYear(); +// depart_min = new Date(y, m - 1, d); +// console.debug(depart_min); $(off_canvas_departure).datepicker('setDate', min_date); - }); - - $(off_canvas_departure).datepicker({ + $(off_canvas_departure).datepicker('option','minDate', min_date ); + // set departure mindate and change datepicker position when arrival is selectes }); + $(off_canvas_departure).datepicker({ + beforeShow: function (input, inst) { + setTimeout(function () { + inst.dpDiv.css({ + top: 100, + left: 50 + }); + }, 0); + } + }); + + $("header").find('ul').find('li').children('a').on("click", function (){ if($(".searchform").css("display") === "none"){ @@ -108,7 +120,6 @@ $(document).ready(function () { }); } - }); var start_date = $(".reservation-front").find("#start-date"); var end_date = $(".reservation-front").find("#end-date"); diff --git a/scss/_right-off-canvas.scss b/scss/_right-off-canvas.scss index ff3df13..4f0559d 100644 --- a/scss/_right-off-canvas.scss +++ b/scss/_right-off-canvas.scss @@ -139,7 +139,7 @@ aside.right-off-canvas-menu { } #jrs_search_submit { float: right; - margin: 0 20%; + margin: 0 50%; background: #73BF45; border: 1px solid #73BF45; input {