Hacker News new | ask | show | jobs
by JCharante 1098 days ago
> (bonus points for the dropdown on expiry date)

I hate dropdowns for the expiry date. Let me just enter 01 TAB 22, I don't want to click on dropdowns then scrolldown.

4 comments

I mean, there's no reason you can't have it both ways? So long as the dropdowns are not some broken custom widget, you can use dropdowns the same way.
Unless the form has been horribly butchered, that should still work, since the browser will select from the dropdown as you type, so long as the dropdown is focused.
1. It's not intuitive that you can type in a dropdown.

2. It's not always obvious if a dropdown is focused or not.

It's orthogonal, but focus doesn't always cycle in the obvious order of input fields with nothing in between.

As for the field, couldn't it be a text field with a small down arrow within for a dropdown option?

Every native dropdown in your OS supports typing to select an option. While it might be arguable if it's intuitive, it definitely is a common pattern.
For me, ideally, you don't need to TAB, because the input focus switches automatically.
If you implement this, please make sure any auto-refocus has visual clues, e.g. looking like a single input field, and behaving like a single field (a TAB moves to the next logical form field).

When inputting license keys in programs, and there were dashes in them, it was always fun encountering an auto-focus across split textfields where you didn't expect it, so you accidentally skipped a field and had to redo it.

I hate the behavior you describe because my muscle memory means I always hit tab.

So now the month is 2023.

More friction.

But still dropdown help users to remember the date layout (MM/YY) and also it is useful in cases where it is not intuitive that you can type. Also, expiry date is always somewhere around 5 to 10 years so not a lot of scroll.
You have to take your hand to mouse, do 4 clicks, then go back to keyboard. Not the end of the world, but it's annoying and is bad for people with. e. g. RSI.

And to remind users about date layout, you can just put MM/YYYY or MM/YY as a placeholder. Of course, if you care about your users and want to go above and beyond, you can even support both MM/YY and MM/YYYY – it's not that hard!