Extend date range

To extend date range from default one use following hooks:

add_filter( 'user_meta_field_config', 'user_meta_field_config_function', 10, 3 );
function user_meta_field_config_function( $field, $fieldID, $formName ){ 
    if( $fieldID != 0 ) // Replace 0 with your filed id
        return $field;
    $field['field_options'] = array( "yearRange"=>"1900:c" );
    return $field;

Please note, you need to change field id in this example, or you can use any other algorithm to filter your field.
You can pass more options to control the datepicker through $field[‘field_options’] as an array.

Leave a Reply