testing min date and todays date placeholder value in the off canavs widget
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 13 Aug 2018 20:52:29 +0000 (16:52 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 13 Aug 2018 20:52:29 +0000 (16:52 -0400)
js/app.js
js/custom/pageSetup.js
parts/reservation-form-off-canvas.php

index e3a4eb1..0456ef5 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -122,6 +122,7 @@ $(document).ready(function () {
             start = "arrival_date=" + y + '-' + m + '-' + d + '&';
         }
     });
+
     $("#depart").datepicker({
         dateFormat: 'mm/dd/yy',
         onSelect: function (date) {
@@ -137,12 +138,12 @@ $(document).ready(function () {
     $("#departCal").click(function () {
         $("#depart").datepicker("show");
     });
-    $("#arriveCalOff").click(function () {
-        $("#arriveOff").datepicker("show");
-    });
-    $("#departCalOff").click(function () {
-        $("#departOff").datepicker("show");
-    });
+    // $("#arriveCalOff").click(function () {
+    //     $("#arriveOff").datepicker("show");
+    // });
+    // $("#departCalOff").click(function () {
+    //     $("#departOff").datepicker("show");
+    // });
     // // form submission logic
     // // off canvas resevation form submission ///////////////////////////////////////////
     $('.res-buttonOff').on('click', function () {
index 05b5543..d2fa9c2 100644 (file)
@@ -113,6 +113,7 @@ $(document).ready(function () {
             start = "arrival_date=" + y + '-' + m + '-' + d + '&';
         }
     });
+
     $("#depart").datepicker({
         dateFormat: 'mm/dd/yy',
         onSelect: function (date) {
@@ -128,12 +129,12 @@ $(document).ready(function () {
     $("#departCal").click(function () {
         $("#depart").datepicker("show");
     });
-    $("#arriveCalOff").click(function () {
-        $("#arriveOff").datepicker("show");
-    });
-    $("#departCalOff").click(function () {
-        $("#departOff").datepicker("show");
-    });
+    // $("#arriveCalOff").click(function () {
+    //     $("#arriveOff").datepicker("show");
+    // });
+    // $("#departCalOff").click(function () {
+    //     $("#departOff").datepicker("show");
+    // });
     // // form submission logic
     // // off canvas resevation form submission ///////////////////////////////////////////
     $('.res-buttonOff').on('click', function () {
index 0a09aff..2088120 100644 (file)
@@ -24,11 +24,11 @@ $oc_properties = array(
              <?php $today = date('Y-m-d'); ?>
              <?php $minStay = date('Y-m-d', strtotime($today. "+1 days" )); ?>
             <div class="small-12 res-date columns">
-                <input id="arriveOff" type="date" placeholder="Arrive" min="<?php echo $today ?>" name="datepicker1" required="required"><img id="arriveCalOff" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
+                <input value="<?php echo $today; ?>" id="arriveOff" type="date" placeholder="Arrive" min="<?php echo $today ?>" name="datepicker1" required="required"><img id="arriveCalOff" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
             </div>
 
             <div class="small-12 res-date columns">
-                <input id="departOff" type="date"  placeholder="Depart" name="datepicker2" required="required"><img id="departCalOff" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg">
+                <input value="<?php echo $minStay; ?>" id="departOff" type="date"  placeholder="Depart" name="datepicker2" required="required"><img id="departCalOff" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg" >
             </div>
             <div class="small-12 columns">
                 <input id="nightsOff" type="text" placeholder="Number of Nights">