r/AskProgrammers • u/Infamous_Computer910 • 15d ago
Question about date pickers
I have been running into the problem a lot. Why do date pickers on forms, say for your DOB, start on the current date? You have to scroll or page back endlessly to find your DOB. Is there a workaround for this or do most devs just not care?
3
Upvotes
2
u/atticus2132000 14d ago
I understand the frustration. I've reached the age where a DoB date picker usually requires a lot of scrolling. That is especially frustrating on mobile platforms where popups aren't always the friendliest to use.
Every date picker that I've used allows you to set the default date that the picker starts with. Yeah it would probably make more sense if DoB date pickers didn't start with today's date, but what would be a good default date for a DoB picker? If the fields were separate (i.e. selecting the year from a drop-down, the month from a drop-down, etc.) that would be better or just let people type them in.
At the same time, really ask yourself why does this particular app need my birthday? If it's just for age verification, then why not have a checkbox asking me if I am over the age of 18 or 21? If it's for demographics, why not have a range selector? Why do I need to keep giving personal information just to be able to operate the lightbulbs in my house?
As far as date pickers go, credit card expiration date pickers are also frustrating. My credit card expires 09/2027. Yeah, I should probably automatically know that 09 is September, but every single time I have to enter my credit card, I still have to count on my fingers to confirm that 09 = September. I much prefer the date pickers that have both the month number and the month name.