MyBB Community Forums

Full Version: Date of Birth Calendar Limit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I was wondering if it would be possible to remove the 'The birthday you entered is invalid. Please enter a valid birthday or leave the field empty.' error?

I'm building an RP, and we have characters that are going to be more than a century old, and it would be cool if we could enter their birth year that is more than 100 years prior to the current year?

Would anyone be able to guide me on how to make the change?

Thank you kindly!
(2019-09-15, 11:08 AM)ThistleProse Wrote: [ -> ](...)

I'm building an RP, and we have characters that are going to be more than a century old, and it would be cool if we could enter their birth year that is more than 100 years prior to the current year?

(...)
Yep, you're right. MyBB disallows a birthday year is exactly 100 years ago. It's not that easy to judge whether this limit is incorrect or aggressive or even a little biased.

If you're using the latest version of MyBB 1.8.21, you may look into this file ./inc/datahandlers/user.php in line 379:
		if($birthday['year'] != 0 && ($birthday['year'] < (date("Y")-100)) || $birthday['year'] > date("Y"))

So you read $birthday['year'] < (date("Y")-100) and you'll probably know what to do with it.

BTW, I'm quite astonishing that users can input 0 as their birthday year.
@noyle ! Thank you that worked perfectly Smile
(2019-09-15, 11:43 AM)noyle Wrote: [ -> ]BTW, I'm quite astonishing that users can input 0 as their birthday year.
In usercp, year is a textfield, so if not filled (or filled with not number value) it gives 0.
You may also completely deacitvate the age verification by simply comment lines 378 - 392.
Then there is no check at all.
Starting comment from line 360 dismiss day/month check as well.

[ExiTuS]