birthdate without calendar
-
Hello,
In my registration page, i need to have a field for the birthdate but the client doesnt really like the date-picker and i would like to just have a input field text where the user can add his birthdate : 1991/04/25 or 19910425
I’ve looked in the input field validation but there is no thing that could validate this pattern. Is there a way to do that ?
-
You can try this datepicker plugin using the Date Time Picker for Contact Form 7.
Deactivating or not using the Date Time Picker for Contact Form 7 will let you enter the birth-date without a calendar.
https://github.com/MissVeronica/UM-Integration-of-Date-Time-Picker
Hey, it seems to work to input date, but what about validation then ?
it could enter 2024/01/01 without error, but someone born in 2024 shouldnt be able register.
Or i could enter 000/44/55, it was validated but then when i look at my form to change user info, it’s changed to 1970/01/01.
Until validation was, only past date and up to 115years.
You can try this new plugin for “Birth Date Validation”
You are amazing! That’s really a add-on plugin! Works perfectly!
Just one thing if i may, i think you are calculating the max_age with only the year, (so 2024 is an error, but not 2023/12/31). I think all day in the future should be an invalid.
So if today is 12/05, today is valid but 12/06 is not.
What do you think ?
is it pushing it to ask for empty value error ?
2024 is an error, but not 2023/12/31
Right code is comparing by years only.
Easy to exclude all of 2023.So if today is 12/05, today is valid but 12/06 is not.
I can exclude all dates from 2023.
empty value error
Yes the plugin is acting before UM detecting empty.
Error message is: The date of birth is not a valid date in the format YYYY/MM/DD “”
I can add another message if required.Would love to have another message for empty value!
I need to check with the customer what he prefers when today+1 is enter, if it’s okay or just to exclude the whole current year.
Let me coming back to you
Version 1.1.0 is available for download now.
These are the changes:Would love to have another message for empty value!
The date of birth is empty. Valid date format is YYYY/MM/DD
when today+1 is enter
When birth_date is today or today+:
The date of birth is not a past date “%s”. Valid date format is YYYY/MM/DDIt’s perfect! Thanks a lot!!! Truly appreciate your help !
Sorry for the additional question.
When i type 19910419 and submit the form, it creates an error “The date of birth is not a valid date in the format YYYY/MM/DD “19990101”, but when the form is reload, the field is showing the correct format 1991/04/19.
Same when i write 23 October 1991, the error is “The date of birth is not a valid date in the format YYYY/MM/DD “23 October 1991” but then the field is showing 1991/10/23.
I dont really need the full date to be working because my website is in japanese, but is there way to make 19910419 format has valid?
is there way to make 19910419 format as valid?
Version 1.2.0: Include accept of format YYYYMMDD
Thanks!!! It works amazingly well!
Hi I tried this and installed the plugin and contact form 7 but still doesn’t replace birthday calendar pop up
@emmamiumiu hi, please can eloborate how you get this done?
If you have this code snippet installed, you can deactivate “Contact Form 7”
and the date/time popup will not display.https://github.com/MissVeronica/UM-Integration-of-Date-Time-Picker
The topic ‘birthdate without calendar’ is closed to new replies.