Fork me on GitHub

datepicker by chrishulbert

Simple, light Javascript date picker, with no javascript framework dependencies.

Demo

Start Date / Time:

End Date:

Install

Put the following 2 or 3 lines in your page's <head> section:

<link rel="stylesheet" type="text/css" href="datepicker.css" /> 
<script type="text/javascript" src="datepicker.js"></script>
<script type="text/javascript" src="timepicker.js"></script>

On any <input> that you want to have a date picker for, set/add the 'datepicker' class:

<input id='start_dt' class='datepicker'>
<input id='another_dt' class='myclass datepicker'>

On any <input> that you want to have a time picker for, set/add the 'timepicker' class:

<input id='start_dt' class='timepicker'>
<input id='another_dt' class='myclass timepicker'>

I hope you enjoy these pickers as much as I enjoyed getting it working cross-browser :)

Contact

Chris Hulbert (chris.hulbert@gmail.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/chrishulbert/datepicker