From 749158e9e7841f6d899a6b4e58744dba42ddfe00 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 4 Apr 2016 13:55:31 -0400 Subject: [PATCH] testing onclick for the contact form checkbox to set default date for departure --- js/app.js | 6 ++++++ js/custom/pageSetup.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/js/app.js b/js/app.js index d87b8df..5a135ff 100644 --- 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); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index fb5bd87..c254094 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -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); -- 2.17.1