Live data from Hacker News

Pickadate.js

github.com

61–70 of 130 posts

Re: Pickadate.js

#61
post #48

HTML5 has type="date" for input fields. It'd be kinda cool if this could automatically use those in situations where the browser doesn't support the picker natively. Unless I totally misunderstand the point ;-)

Support for input type="date" can be tested by creating an element like that and checking the type attribute. But how can you tell if the browser has support for the native picker? You can't. That is why this picker takes the approach of changing the type date always to text to prevent double date pickers.

But how can you tell if the browser has support for the native picker? You can't.

That's what I was wondering. If there were a way, it'd be pretty awesome to use a library like this as a polyfill rather than as a separate thing you attach to text inputs.

Re: Pickadate.js

#62
post #60

>6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: https://github.com/potch/fortnight.js (Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

It makes my Chrome and IE9 freeze because of an infinite loop at #228 in the demo.

Re: Pickadate.js

#63
post #2

From the demos it appears that this doesn't have keyboard support. That seems like a major drawback from an accessibility standpoint. It does look nice and easy otherwise, though.

Fork, fix and contribute.

Done:

http://news.ycombinator.com/item?id=4812223

It is even done without html5 input/type=date so probably is compatible with IE4

Re: Pickadate.js

#64
post #62
post #60

>6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: https://github.com/potch/fortnight.js (Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

It makes my Chrome and IE9 freeze because of an infinite loop at #228 in the demo.

Thank you for the bug report!

Re: Pickadate.js

#65
post #2

From the demos it appears that this doesn't have keyboard support. That seems like a major drawback from an accessibility standpoint. It does look nice and easy otherwise, though.

Fork, fix and contribute.

[deleted]

Re: Pickadate.js

#66
pickadate is just as opinionated as jquery ui. why must component writers insist on hard-coded (and non-customisable) use-cases. there's simply no need to mandate an `input` element.

Re: Pickadate.js

#67
post #60

>6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: https://github.com/potch/fortnight.js (Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

Freezes up Chrome 23, Firefox 16.0.2 (shows "stop this script?" box) and Safari 6.0. Opera does not freeze, but the UI is very slow, suggesting something is still wrong.

Re: Pickadate.js

#68
post #60

>6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: https://github.com/potch/fortnight.js (Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

I have always wondered why javascript date pickers were always over complicated for the job.

https://github.com/listenrightmeow/daterange

Under 5k/100 lines uncompressed. You can easily modify above to work in a prototype fashion without a library. Unfortunately I was lazy when I wrote it and used ender/jquery for selector support.

Re: Pickadate.js

#69
post #60

>6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: https://github.com/potch/fortnight.js (Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

Freezes up Chrome 23, Firefox 16.0.2 (shows "stop this script?" box) and Safari 6.0. Opera does not freeze, but the UI is very slow, suggesting something is still wrong.

I believe I made a huge mistake in my calendar rendering code. Hoping it's fixed now. Sorry for freezing!
Post reply on HN