Skip to content

Don’t Reinvent the Wheel

See the updated version.

I needed a date/time picker and spend a couple of hours making a simple one:

Obviously, I didn't spend a couple of hours putting this together. I wrote it quickly, then spend the hours getting it to work even remotely correctly in Internet Explorer.

Download the code and the HTML template.

But I wasn't fond of the user interface (edit time by typing, then click on date) or the design, so I decided to search for something better and found, via John Resig, Maxime Haineault's timepickr.

$('#timepickr').timepickr({convention: 12, resetOnBlur: false});

Which I like a lot more (I'll have to separate the date from the time-picking, but I think that's the right approach anyway). This should teach me that Google Is My Friend. No need to invent everything from scratch!

{ 2 } Comments

  1. Dan | July 11, 2009 at 3:15 pm | Permalink

    “No need to invent everything from scratch!”

    except… the second timepicker doesn’t work.
    For me.

  2. Danny | July 12, 2009 at 8:14 pm | Permalink

    Oops. When I updated it, I changed the name from ui.timepickr.js to jquery.timepickr.js. I have corrected it. See the new version:

Post a Comment

Your email is never published nor shared. Required fields are marked *