Best Jquery Date Pickers and Time Pickers

Jquery is my all-around favorite Javascript library for developing websites with rich UIs (among many other assorted goodies offered by Jquery). In this post, I share my favorite date and time picker Jquery plugins.

1. Jquery Datepicker

Not strictly speaking a plugin, Datepicker comes out of the box as part of the Jquery UI add-on library, and is a tried and true rich UI date picking widget, with lots of config options. If you need something that “just works” quickly and gets the basic (date picking) job done fast, look no further than this one.

Continue reading

A Better Way To Display “Time ago” Using Jquery

For a side project that I was working on recently, we wanted to display dates for content using the “time ago” format as opposed to showing a literal date/time, for instance “Posted 10 minutes ago” or “Posted 2 days ago”, etc.

This is quite simple to implement server side with a function such as this that takes a date and returns a nicely worded string in the form of “X mins/hours/days/weeks/months ago”. However for this project we needed to do heavy page caching, rendering the page in PHP first and then caching the full HTML for 30 minutes, long enough that the time ago format would quickly show outdated numbers.

To the rescue… Continue reading