From: Anthony Talarico Date: Mon, 4 Apr 2016 17:55:31 +0000 (-0400) Subject: testing onclick for the contact form checkbox to set default date for departure X-Git-Tag: v1.0.0~93 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=749158e9e7841f6d899a6b4e58744dba42ddfe00;p=WP-Themes%2Fpetoskeyveterinarian.git testing onclick for the contact form checkbox to set default date for departure --- 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);