Live data from Hacker News

Pickadate.js

github.com

81–90 of 130 posts

Re: Pickadate.js

#81
Nice work, thanks for the contribution. Will definitely use. Funny thing to, just created a web app that centers around a calendar and date picking. Was using jQuery UI datepicker but with some tweaking, I might use this.

Re: Pickadate.js

#82
post #76

Earlier quoted context omitted.

It's still happening. Now (unlike before) it does show the widgets, but Chrome goes up to 100% CPU and nothing happens when I click the widgets.

I can't reproduce- what version of chrome are you using? I'm re-evaluating all my loops to increase general safety.

Chrome 23 on Mac. Still happening with FF, even after upgrading to 17.0. FF's "Unresponsive script" alert box mentions line 103.

It's not just loops that can trigger this stuff. It's also callbacks that trigger the same callbacks.

Re: Pickadate.js

#83
post #24

https://github.com/amsul/pickadate.js/blob/gh-pages/pickadat... the code is a giant var statement. I don't know why, but somehow that bothers me.

The lack of semicolons and the use of jshint bothers me.

It doesn't lack semicolons, it's only using them where necessary.

Re: Pickadate.js

#84
post #76

Earlier quoted context omitted.

It's still happening. Now (unlike before) it does show the widgets, but Chrome goes up to 100% CPU and nothing happens when I click the widgets.

I can't reproduce- what version of chrome are you using? I'm re-evaluating all my loops to increase general safety.

It's the "while (!done)" loop. next(2012-09-24) returns the same date. Not sure why yet.

Re: Pickadate.js

#85
post #76

Earlier quoted context omitted.

It's still happening. Now (unlike before) it does show the widgets, but Chrome goes up to 100% CPU and nothing happens when I click the widgets.

I can't reproduce- what version of chrome are you using? I'm re-evaluating all my loops to increase general safety.

Your date arithmetic jumps through some weird hoops to accomplish something really simple. To increment a date by one day, for example, can be done like so:

      d = new Date(base);
      d.setDate(d.getDate() + 1);
Changing rel() to do this fixes the loop problem, but something else is surely wrong, because the result page now looks like this: http://i.imgur.com/ZUAJg.png

Re: Pickadate.js

#86
post #48

Earlier quoted context omitted.

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.

You can. Modernizr will tell you if the browser supports the native picker. http://modernizr.com/

Re: Pickadate.js

#88

When pairing this up with jqueryui js on the same page, none of it seems to be working. Not sure why, seems to not have the proper name spacing?

So i guess im answering my own question here. jqueryui names their datepicker under the same function name, I have to have jqueryUI and dont have the capacity to install a custom version of jquery ui to remove datepicker so this is basically useless to me.

Re: Pickadate.js

#89
This is a beautiful interface, but it doesn't provide any practical way to select dates in the distant past. "What is your birthdate" is one of many example questions that couldn't be answered without tens of dozens of clicks.

If it supported keyboard input, that problem would be solved.

Post reply on HN