Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add select fields for month and year to date field
<?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