Add select fields for month and year to date field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add select fields for month and year to date field | |
*/ | |
function prefix_date_field_params_change_month( $params, $item ) { | |
$params[] = "changeMonth: true"; | |
$params[] = "changeYear: true"; | |
$params[] = "yearRange: '1900:2030'"; | |
return $params; | |
} | |
add_filter( 'pewc_filter_date_field_params', 'prefix_date_field_params_change_month', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment