Live data from Hacker News

Pikaday: A friendly guide to front-end date pickers

pikaday.dbushell.com

81–90 of 146 posts

Re: Pikaday: A friendly guide to front-end date pickers

#81
Web devs should really discover that using standard native controls is the way to go.

The worst thing that can happen to a website is to use a custom scrolling logic/scrollbar. It never behaves correctly.

Next step would be discovering that we have been doing this since Windows 3.11, and we lost this ability because of web programmers.

Re: Pikaday: A friendly guide to front-end date pickers

#83
post #74

Earlier quoted context omitted.

That doesn't always work well in practice. I'm bilingual, and my preference is to use the locale closest to the language of the web site I'm visiting because it feels the most culturally coherent and the least surprising. I just can't reset my regional settings whenever I switch tabs.

I also find this annoying, but this is due to websites ignoring the browser preferences. The browser supports specifying multiple languages and the website could select the one that the content is native in.

I don’t think there’s a browser setting that lets you use the locale the web site’s language in, is there?

Re: Pikaday: A friendly guide to front-end date pickers

#84
post #69

Earlier quoted context omitted.

This should be called bad advice about dates every developer should avoid. ISO 8601 does NOT work with future dates. It does not work with cross border appointment booking. ISO 8601 only works for dates and times that have already happened. I have 20 years, have worked with apps that relied on future and past dates, have used date pickers since 2005 and would still hesitate to give advice about what is an incredibly…

> ISO 8601 does NOT work with future dates. It does not work with cross border appointment booking. Why is this the case? Is it some time zone shenanigans?

Timezones change, more frequently than you realize. Some countries even used to change when summer time started regularly. It's got better than it used to be afaik.

Also you need to take into account where the user is going to be. With future dates, time is relative. So at the very least you often need the time + the timezone of the location.

Book me a table at 8, means book me a table in Berlin time at 8, not in San Francisco time at 8.

Same with displaying future dates, you need the context of where.

Re: Pikaday: A friendly guide to front-end date pickers

#85
The best date picker is the one which doesn’t require picking a date. If done correctly, the browser can auto-fill your birthday, for example. In many other cases it’s possible and makes sense to guess a date and prefill the date field. Phones attempt the same with being biased towards entering the current date or datetime.

Re: Pikaday: A friendly guide to front-end date pickers

#87
post #49
post #47

Earlier quoted context omitted.

Why were you using a calendar picker for a date of birth?

Could you explain what you mean? We're talking about the OS-native datepicker, which pops up when a user clicks on an HTML .

Using a calendar picker to input dates that users have memorised and are in the distant past is an awful experience. This is a pet peeve of mine.

Re: Pikaday: A friendly guide to front-end date pickers

#88

Earlier quoted context omitted.

Date picker widgets do not solve any validation problem, because validation happens on the server side and client input is not to be trusted.

Obviously, but additionally, providing validation on the frontend can help UX a lot. Doing that can provide much quicker feedback compared to an error thrown at the user only after submitting a form, which can get especially annoying if the latter loses (some of) its values due to submission. And one solution for that problem can be using a native picker.

That is called input assistance, confusing it with validation is the source of millions of security problems.

Re: Pikaday: A friendly guide to front-end date pickers

#90
I'm surprised the article doesn't talk about the element. It makes the using the native time input much more user friendly as you can populate it with common times (e.g. Every 30 minutes: 09:00, 09:30, etc... instead of allowing every minute to be selected by default)

It's not quite fully supported in browsers but it's a nice enhancement to those where it works.

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

Post reply on HN