• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Custom field no date before 2006?

AndreaMarucci

Well-known member
#1
Hello, I've created in my test forum a custom user field with the birth date and set it to show date in the past.

When a user register, clicking on the year a drop down menu is shown but it's impossible to select a year before 2006, so this field is basically useless and the user has to input the date manually.

Schermata 2017-11-13 alle 13.27.25.png

How can I make this so the past years are shown?
 

Chris D

XenForo developer
Staff member
#2
Bit of a tip for you: No one wants to enter their date of birth using a calendar.

Bear in mind that XF already has a date of birth field, I'm unsure why you'd need another.

Either way, the date picker isn't fit for this purpose. It will display a list of years roughly 10 years either side of the current year.
 

Mike

XenForo developer
Staff member
#3
The dropdown is always 10 years either side of the currently selected year, so it is possible to select an older years, though quite tediously. It's not really designed for this particular task.
 

Snog

Well-known member
#6
While I agree that nobody wants to enter a birthday using a date picker, I'd like to remind everyone that the number of years, or the range of years has been exposed in the template code for quite a while...

Code:
data-year-range="##"
OR
data-year-range="[{$data.range_low}, {$data.range_high}]"