date picker range slider
-
Hello,
I have a problem with the age filter on the member directory the slider does not indicate the age but only minimum and maximum. Surprisingly when I use it the age appears in the URL of the web browser.
I checked
Age: {min_range} – {max_range} years old
Age: {value} years oldAnd here
/** * @param $filter * * @return mixed */ function slider_range_placeholder( $filter, $attrs ) { switch ( $filter ) { default: { $label = ! empty( $attrs['label'] ) ? $attrs['label'] : $filter; $label = ucwords( str_replace( array( 'um_', '_' ), array( '', ' ' ), $label ) ); $placeholders = apply_filters( 'um_member_directory_filter_slider_range_placeholder', false, $filter ); if ( ! $placeholders ) { switch ( $attrs['type'] ) { default: $placeholders = array( "<strong>$label:</strong> {value}", "<strong>$label:</strong> {min_range} - {max_range}", ); break; case 'rating': $placeholders = array( "<strong>$label:</strong> {value}" . __( ' stars', 'ultimate-member' ), "<strong>$label:</strong> {min_range} - {max_range}" . __( ' stars', 'ultimate-member' ) ); break; } } break; } case 'birth_date': { $placeholders = array( __( '<strong>Age:</strong> {value} years old', 'ultimate-member' ), __( '<strong>Age:</strong> {min_range} - {max_range} years old', 'ultimate-member' ) ); break; } } return $placeholders; }
I found a workaround by creating a field where users simply indicate their age, but I would like to know if you have a script based on the year of registration to add more 1 years to the age indicated
Thanks for help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘date picker range slider’ is closed to new replies.