Skip to main content

Purdue ECN's Javascript Calendar Control

I was on the Internet in search for an easy to use (as in use for writing code), I ran into Purdue ECN's widget, extremely easy to use in web-apps of any type and providing nice user interface.

It's called CalendarControl and the thing to appreciate most about it is that it requires just 1 .js file, 1 accompanying .css file and just 1 onFocus call to invoke it.

It supports the US date format mm/dd/yyyy, but I could make changes in lines 258-260 and 147 to adapt it to the machine-friendly format of yyyy/mm/dd.


Here's the JS:

Here's the CSS:

Here's how your tag should look like:
<input name="any_name_for_date_field" onfocus="showCalendarControl(this);" type="text">

It took me 15 minutes to integrate into my app - try it. More info at:

The fact that the tool comes from my alma-mater Purdue makes it even more satisfying and fun to use!