Skip to content

Commit 4731b5e

Browse files
sbassahspivurno
andauthored
Automatically Show Datepicker for Linked Date Field
* Automatically Show Datepicker for Linked Date Field * Update gpld-automatically-show-linked-datepicker-for-linked-date-field.js Co-authored-by: David Smith <david@gravitywiz.com>
1 parent bf07c58 commit 4731b5e

File tree

1 file changed

+16
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)