Trent Richardson

practical web design & development

Timepicker Addon Now on Github

Just wanted to update on the timepicker addon. I’ve had trouble keeping up with all the submitted code for features and bug fixes I saw it as a good idea to add timepicker to Github. I’m still a bit new to Github, so please bear with me as I’m just getting my feet under me. Hopefully now instead of going through blog posts grabbing snippets of code there will be a more organized way of updating and keeping up with changes to the timepicker addon.

Also after I get fairly familiar with it I am considering moving all my little projects over to it (uberuploadcropper, Impromptu, iframer, etc..). I hope this works best in the long run. Many people have submitted code but I just can’t find the time to integrate it all in a timely manor. I hope this improves the turnaround rate for updates!

New to Github

So I recently signed up on Github.. it seems to be the coolest thing to do right now. I’ve put some thought towards moving my projects over to it. However, other than version control I don’t see what the benefit is in it? I guess it will allow other people to view and commit too? The part I don’t favor is the fact that it will separate the downloads from the documentation, which I’m not a fan of. I would much rather the “one stop shop” like it is now.

What are your thoughts?

Timepicker 0.5

Just a delayed announcement that the jQuery Timepicker Addon 0.5 is now available. The most notable fix is the correction of the bug with the stepHour, stepMinute, and stepSecond. Thank you Peter for you help! The next step is correcting some of the options (change events, etc..).

Timepicker Download and Examples

I’ve been messing with some table with a lot of numbers, and one thing that came up is that I need to select all cells which have zero, or not zero. Sounds straight forward but there could be multiple variations of zero (0, 0.0, 0.000, .0, etc..). Here is a couple quick selectors to check for this (or any number, not just zero):


$.expr[":"].numbereq = function(obj, index, meta, stack){
	return parseFloat((obj.textContent || obj.innerText || $(obj).text() || "")) == parseFloat(meta[3]);
}

And you would call it like this:


$(".myel:numbereq(0)");

And since that was so easy I figure I might as well do the not equals as well..


$.expr[":"].numberneq = function(obj, index, meta, stack){
	return parseFloat((obj.textContent || obj.innerText || $(obj).text() || "")) != parseFloat(meta[3]);
}

And you would call it like this:


$(".myel:numberneq(5)");

There you go, a pretty quick, simple selector to help out when dealing with numbers as your text content of nodes.

Timepicker Addon 0.4

A new timepicker is now available thanks to Jeremy and other commenters. I don’t have all the suggested/submitted changes yet. Jeremy submitted quite a few changes so I thought I would take a couple smaller steps in integrating all the other changes. I know there are still a few issues that commenters mentioned which are not fixed, but I’m trying to work through them, promise! Thank You everyone for your code changes and suggestions!

Timepicker Documentation and Download