Skip to content

Commit bf07c58

Browse files
sbassahspivurno
andauthored
Populate New Maximum Date into Linked Date Field
* Populate New Maximum Date into Linked Date Field * Added Instruction to header. * Update gpld-populate-new-maximum-date-into-linked-date-field.js Co-authored-by: David Smith <david@gravitywiz.com>
1 parent 25505b8 commit bf07c58

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Gravity Perks // Limit Dates // Populate the New Maximum Date into Linked Date Field
3+
* https://gravitywiz.com/documentation/gravity-forms-limit-dates/
4+
*
5+
* When Field B’s maximum date is dependent on the selected date in Field A,
6+
* this snippet will automatically populate the maximum date into Field B.
7+
*
8+
* Instructions:
9+
* 1. Install our free Custom Javascript for Gravity Forms plugin.
10+
* Download the plugin here: https://gravitywiz.com/gravity-forms-custom-javascript/
11+
* 2. Copy and paste the snippet into the editor of the Custom Javascript for Gravity Forms plugin.
12+
*/
13+
gform.addAction( 'gpld_after_set_max_date', function( $input, date ) {
14+
$input.datepicker( 'setDate', date );
15+
} );

0 commit comments

Comments
 (0)