adjusted submit button style for off canvas booking widget, fixed bug with departure...
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jul 2016 19:53:56 +0000 (15:53 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 28 Jul 2016 19:53:56 +0000 (15:53 -0400)
css/app.css
js/app.js
js/custom/pageSetup.js
scss/_right-off-canvas.scss

index 733ae34..9879750 100644 (file)
@@ -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 {
index d03ba61..804b4df 100644 (file)
--- 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");
index 8c4cd51..cdc5e6b 100644 (file)
@@ -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");
index ff3df13..4f0559d 100644 (file)
@@ -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 {