Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Field: Date Selector max "Year" limit

  • Avatar of hmpluv
    hmpluv
    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)
  • Avatar of Vinod Dalvi
    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

    Avatar of hmpluv
    hmpluv
    Participant

    @hmpluv

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

    Avatar of danbpfr
    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)

You must be logged in to reply to this topic.