Skip to content

Commit 6a25f15

Browse files
authored
gpld-limit-to-current-month.php: Added new snippet.
1 parent 1fbf680 commit 6a25f15

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
/**
3+
* Gravity Perks // Limit Dates // Limit Dates to Current Month
4+
* https://gravitywiz.com/documentation/gravity-forms-limit-dates/
5+
*/
6+
// Update "123" to your form ID and "4" to your Date field ID.
7+
add_filter( 'gpld_limit_dates_options_123_4', function( $field_options ) {
8+
9+
$field_options['minDate'] = date( 'm/01/Y' );
10+
$field_options['maxDate'] = date( 'm/t/Y' );
11+
12+
return $field_options;
13+
} );

0 commit comments

Comments
 (0)