fixed departure date from not being restricted
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 17 Nov 2015 17:15:23 +0000 (12:15 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 17 Nov 2015 17:15:23 +0000 (12:15 -0500)
js/app.js
js/custom/pageSetup.js

index 9ecf1ee..1ab6119 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -55,8 +55,7 @@ $(document).ready(function () {
         $("#head-img").remove();
      
     }
-    // save guest input
-    
+
     // date picker images for each calendar
     $("#cal1").click(function () {
         $("#date1").datepicker("show");
@@ -72,7 +71,9 @@ $(document).ready(function () {
     });*/
   //  $("#dateOff1").val("Arrive");
    // $("#dateOff2").val("Depart");
-    // restrict arrival date //////////////////////////////////////////////
+    
+    
+    // restrict arrival date off canvas //////////////////////////////////////////////
    $(document).on('change', '#dateOff1', function () {
         currentDate = $("#dateOff1").val();
         currentDate = new Date(currentDate);
@@ -105,6 +106,7 @@ $(document).ready(function () {
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
         $("#dateOff2").val(requiredDate);
+            
         }
         
     });
@@ -125,7 +127,7 @@ $(document).ready(function () {
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
         if ($("#dateOff2").val() < $('#dateOff2').attr("min")) {
-           // $("#dateOff2").val(requiredDate);
+           $("#dateOff2").val(requiredDate);
         }
     });
     $("#date1").datepicker({
index 172210d..50ac07a 100644 (file)
@@ -46,8 +46,7 @@ $(document).ready(function () {
         $("#head-img").remove();
      
     }
-    // save guest input
-    
+
     // date picker images for each calendar
     $("#cal1").click(function () {
         $("#date1").datepicker("show");
@@ -63,7 +62,9 @@ $(document).ready(function () {
     });*/
   //  $("#dateOff1").val("Arrive");
    // $("#dateOff2").val("Depart");
-    // restrict arrival date //////////////////////////////////////////////
+    
+    
+    // restrict arrival date off canvas //////////////////////////////////////////////
    $(document).on('change', '#dateOff1', function () {
         currentDate = $("#dateOff1").val();
         currentDate = new Date(currentDate);
@@ -96,6 +97,7 @@ $(document).ready(function () {
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
         $("#dateOff2").val(requiredDate);
+            
         }
         
     });
@@ -116,7 +118,7 @@ $(document).ready(function () {
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
         if ($("#dateOff2").val() < $('#dateOff2').attr("min")) {
-           // $("#dateOff2").val(requiredDate);
+           $("#dateOff2").val(requiredDate);
         }
     });
     $("#date1").datepicker({