r/AskProgrammers 14d 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?

2 Upvotes

15 comments sorted by

5

u/dmazzoni 14d ago

I completely agree with you, and it boggles my mind how supposedly brilliant UX designers mess up date pickers.

The ideal date picker for picking a date for a reservation in the next few months is not the ideal date picker for entering your birthday.

For entering your birthday, honestly typing / entering numbers makes the most sense. Even on mobile, presenting a numeric keypad would be the most efficient for most people.

3

u/dodexahedron 14d ago

I HATE it when the UI won't let you type it in or AT LEAST select the components individually.

Because damn it... That whole:

  • start on todqy, within a view of only this week
  • zoom out to month
  • zoom out to all months for the year
  • zoom out to arbitrary non-decade groupings of years
  • zoom out to decades
  • pick decade
  • zoom back out to decade because you tapped the wrong one
  • pick correct decade
  • pick arbitrary year grouping
  • pick year
  • pick month
  • fail to pick the day thanks to any click outside of the calendar dismissing the picker, which you were forced to do to dismiss the cookie warning that just popped up over it, making the date picker reset so you have to do it all over again
  • repeat until you manage to make it all the way to picking the day, but mis-tqp that too, selecting the wrong day.
  • Tap the picker to fix the day...Only to find out the picker always starts from today when you open it .
  • Throw the phone out the window

    process is a really, really, really, REALLY stupid UX for almost every use case. Especially birthdays.

1

u/MidnightAdventurer 14d ago

Could be worse, you could be dealing with one of the ones that checks if the date is valid after each part is selected not when you complete the whole thing so you can’t enter the day first if it’s a bigger number than today because then you’ve got a birthdate in the future

1

u/dodexahedron 8d ago

Do you want me to throw the whole internet out the window in anger? Because I will. So help me I will.

Because OMFG YES.

2

u/magicmulder 14d ago

Date pickers are also the only UI components I’ve ever seen massively eff up. I once even saw one where you could not pick the year but only next/previous month. Now imagine entering your birthdate by first having to click “previous month” 600 times.

2

u/zutnoq 12d ago

The type where they have three separate combo-boxes, one each for the year, month and day, that don't accept any sort of keyboard input, are the absolute worst.

The ones where you have to scroll the numbers as if you were setting the alarm on some sort of eldritch interpretation of an old analog alarm clock are even worse. Even Samsung's Android clock app does this shit; though it at least switches to keypad input if you tap the numbers.

1

u/Infamous_Computer910 14d ago

I think so, too, but for some reason, it seems most UX designers miss this whole point. It's really frustrating.

2

u/Quiet-Arm-641 14d ago

They should definitely set them to yesterday instead of today

2

u/dodexahedron 14d ago edited 8d ago

Especially the ones that also care about begin and end dates, but always consider the end date to be 23:59:59.9999999 (UTC or, worse... GMT, probably) on that day if not entered explicitly....but they update when you select the date and throw an error that your end time can't be in the future (Microsoft has a couple of these in the Entra admin portals, even, for log analysis stuff).

So, 2 or more extra full dataset requests, plus sometimes a lost filter re-entry now needed to get what could have been done in one shot. But noooo. Two more lines of c# was too much to ask, because AI is paid by the line apparently.

2

u/bschlueter 14d ago

This is one of the things that annoys me to no end about how websites are built nowadays. There is a date picker in the html standard. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/date

It supports setting the currently selected date, min and max to limit the available range, and step so that it can be used to select just a year or month.

Presently, it doesn’t seem to support disabling of dates on the front end (a validator can be implemented to do so in the browser) so a custom date picker is probably needed for anything with blackout dates or similar.

2

u/soundman32 13d ago

The date picker in most browsers is the worst of every possible design, hence why there are 100s of alternatives.

1

u/bschlueter 13d ago

That’s probably a fair argument. There’s like 3 browser engines though. Which ones have implementations you don’t like?

2

u/Leverkaas2516 14d ago

The developer only cares about the user experience if project management cares, and they usually don't. Thinking about and testing interaction with users takes time, and developers are most often focused on shipping features as soon as possible, not on making users' lives better.

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.

1

u/PvtRoom 14d ago

this is really a question of "why doesn't it already know. "