Reverted off canvas calendar back to native html5 date type
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 17 Nov 2015 16:55:10 +0000 (11:55 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 17 Nov 2015 16:55:10 +0000 (11:55 -0500)
js/app.js
js/custom/pageSetup.js
page-150.php
parts/off-canvas-menu.php

index 5861f76..9ecf1ee 100644 (file)
--- 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) {
 
         }
-    });
+    }); */
 });
index 1d6158e..172210d 100644 (file)
@@ -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) {
 
         }
-    });
+    }); */
 });
index 490170c..5d4cf0c 100644 (file)
@@ -19,6 +19,7 @@
                         <?php endwhile; else:?>
                         <p><?php _e('Sorry, no results found.');?></p>
                         <?php endif;?>
+                        <?php  $property = urlencode($_REQUEST['Location']); ?>
                         <?php  $arrival = urlencode($_REQUEST['ArrivalDate']); ?>
                         <?php  $departure = urlencode($_REQUEST['DepartureDate']); ?>
                         <?php  $occupancy= urlencode($_REQUEST['Occupancy']); ?>
@@ -31,7 +32,7 @@
                             } 
                     
                             ?>
-                        <iframe name="res_frame" src="https://weblink.instantsoftware.com/widgetsearch/1134?ArrivalDate=<?php echo $arrival ?>&DepartureDate=<?php echo $departure ?>&Location=<?php echo urlencode($_REQUEST['Location']); ?>&Occupancy=<?php echo $occupancy ?>" height="3300" id="res_frame" width="100%" frameborder="0"></iframe>
+                    <iframe name="res_frame" src="https://weblink.instantsoftware.com/widgetsearch/1134?Location=<?php echo $property ?>&ArrivalDate=<?php echo $arrival ?>&DepartureDate=<?php echo $departure ?>&Occupancy=<?php echo $occupancy ?>" height="3300" id="res_frame" width="100%" frameborder="0"></iframe>
                 </div>
             </div>
         </div>
index 3b58fdb..40d81a5 100644 (file)
                 <input type="text" placeholder="Search by property" name="s">
             </div>
             <div class="small-6 res-date columns">
-                <input id="dateOff1" type="text" placeholder="Arrive" name="ArrivalDate" required="required">
+                <input id="dateOff1" type="date" min="<?php echo $requiredDate ?>"  placeholder="Arrive" name="ArrivalDate" required="required">
                 <img id = "offCal1" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
             </div>
             <div class="small-6 res-date columns">
-                <input id="dateOff2" type="text" placeholder="Depart" name="DepartureDate" required="required"><img id ="offCal2" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
+                <input id="dateOff2" type="date" min="<?php echo $minStay ?>" placeholder="Depart" name="DepartureDate" required="required"><img id ="offCal2" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
             </div>
             <div class="small-6 guest columns">
                 <!--<input id="offGuests" type="text" placeholder="Guests" > -->