Live data from Hacker News

Pikaday: A friendly guide to front-end date pickers

pikaday.dbushell.com

71–80 of 146 posts

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

#71
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?

And what format does work for future dates?

Or do you mean that ISO 8601 doesn't work but RFC 3339 does work or some other updated ISO/RFC format?

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

#72
I think this article misses the fact that the native date and time pickers look ugly in Chrome, and that a lot of websites are ultimately an extension of a brand, not just a tool where function > form. The Airbnb date range picker looking on-brand makes the experience seem a lot more slick. There are more things to optimise for than just accessibility.

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

#73

I think this article misses the fact that the native date and time pickers look ugly in Chrome, and that a lot of websites are ultimately an extension of a brand, not just a tool where function > form. The Airbnb date range picker looking on-brand makes the experience seem a lot more slick. There are more things to optimise for than just accessibility.

I agree with the other things though like having multiple inputs for date ranges / trying to use native elements with just some custom styling.

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

#74
post #3

Native datepickers fall apart when you need to handle different date formats as user preferences (not as browser default)

The browser, called the User Agent (UA), IS the program the user uses to interact with a website according to his preferences.

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.

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

#75
post #56

Earlier quoted context omitted.

This is the place where the date picker does not help the user at all. It's easier to type the, presumably memorized, date, than to look it up in the calendar no matter how nice and handy the calendar is. Sure it does solve validation problem. Or maybe not correctly, don't ask about locales and date adjustments.

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.

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

#76
post #11
post #4

> Travel booking often has a fixed schedule with limited time options, such as every 15 minutes. Relative dates like “Today” and “Tomorrow” can be easier to understand. Except when you're booking a flight and you're not sure whether "today" is based on your local time, the server's local time, or GMT. (I often book flights right about midnight and find words like "today" and "tomorrow" to be completely confusing.)

Montreal public transit times used to be on some kind of like, 28-hour clock. Bus times after midnight would be labelled 27:30 or something. Suuuper confusing. It sounds so bizarre in fact, that I'm doubting my memory a bit, but I'm certain it was like that (say around 2006 or so).

UK buses and trains do this.

I think the reason is for Day return tickets ie those where you can go out and come back on the same day. It allows the return to be after midnight which makes sense for example going to a theatre show or pub that shuts at 11pm

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

#77
post #74

Earlier quoted context omitted.

The browser, called the User Agent (UA), IS the program the user uses to interact with a website according to his preferences.

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.

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

#78

Earlier quoted context omitted.

This should be higher up. Posting a deprecated library with this title is an interesting choice.

You're all getting a little confused! This is an up-to-date guide demonstrating why the old deprecated Pikaday JavaScript Datepicker is no longer needed.

yep! I decided to repurpose the pikaday.com domain because it was still seeing a lot of traffic despite the project being unmaintained for years.

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

#80
post #3

Native datepickers fall apart when you need to handle different date formats as user preferences (not as browser default)

The browser, called the User Agent (UA), IS the program the user uses to interact with a website according to his preferences.

How do you configure Firefox to show date-time picker in 24h format?
Post reply on HN