testing onclick for the contact form checkbox to set default date for departure
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 4 Apr 2016 17:55:31 +0000 (13:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 4 Apr 2016 17:55:31 +0000 (13:55 -0400)
js/app.js
js/custom/pageSetup.js

index d87b8df..5a135ff 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -58,6 +58,12 @@ $(document).ready(function () {
     // set arrival and depature dates to datepickers
     $('#input_3_8, #input_3_9, #input_4_8, #input_4_9, #input_3_11, #input_3_12, #input_4_11, #input_4_12').datepicker();
     
+    $('#choice_4_34_1').click(function(){
+    if (this.checked) {
+        $('#input_4_19').datepicker();
+            $("#input_4_9").datepicker("setDate", 2);
+        }
+    }); 
     // set departure date to default of 2 days from today
     $("#input_3_9, #input_4_9").datepicker("setDate", 2);
     
index fb5bd87..c254094 100644 (file)
@@ -49,6 +49,12 @@ $(document).ready(function () {
     // set arrival and depature dates to datepickers
     $('#input_3_8, #input_3_9, #input_4_8, #input_4_9, #input_3_11, #input_3_12, #input_4_11, #input_4_12').datepicker();
     
+    $('#choice_4_34_1').click(function(){
+    if (this.checked) {
+        $('#input_4_19').datepicker();
+            $("#input_4_9").datepicker("setDate", 2);
+        }
+    }); 
     // set departure date to default of 2 days from today
     $("#input_3_9, #input_4_9").datepicker("setDate", 2);