Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Field: Date Selector max "Year" limit


  • loremipsum2000
    Participant

    @hmpluv

    Hi I am using the profile fields date selector to calculate a person’s age

    but as the date selector goes up to the year 2030 people’s age turn out to -19 and what not

     

    How might I limit the max year limit in the date selector profile field?

     

Viewing 3 replies - 1 through 3 (of 3 total)

  • Vinod Dalvi
    Participant

    @vinod-dalvi

    You can limit the year in the date selector profile field using bp_get_the_profile_field_datebox filter and modifying the for loop year range as shown in following code :

    http://pastebin.com/Xvtb00LU


    loremipsum2000
    Participant

    @hmpluv

    where is the “bp_get_the_profile_field_datebox filter” file so I can modify the code?


    danbpfr
    Participant

    @chouf1

    @hmpluv

    you modify the code you received above (which work as is), not the original filter.

    This code goes into theme’s functions.php

     

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Profile Field: Date Selector max "Year" limit’ is closed to new replies.
Skip to toolbar