Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions experimental/gpld-default-to-min-date.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Gravity Perks // GP Limit Dates // Default value to the minimum date allowed
* https://gravitywiz.com/documentation/gravity-forms-limit-dates/
*
* Instructions:
* 1. Install our free Custom Javascript for Gravity Forms plugin.
* Download the plugin here: https://gravitywiz.com/gravity-forms-code-chest/
* 2. Copy and paste the snippet into the editor of the Custom Javascript for Gravity Forms plugin.
* 3. Update `formId` variable accordingly
* We're no longer using the experimental folder for experimental snippets. 🚧
* You can now find the snippet here:
* https://github.com/gravitywiz/snippet-library/blob/master/gp-limit-dates/gpld-default-to-min-date.js
*/
var fieldId = 5;

/* Not ideal to use the setTimeout, but it helps make sure the datepicker is ready to go. */
setTimeout( function () {
jQuery( '#input_GFFORMID_' + fieldId )
.val( GPLimitDates.getDateValue( '', 'minDate', fieldId, GFFORMID, GPLimitDatesDataGFFORMID ) )
.change();
} );
Loading