views:

161

answers:

3

I'm looking for a javascript drop-down for a date range that allows the user to select start and end dates from a single form field, similar to what exists in the Google Analytics UI.

I've found a lot of pre-existing javascript for two separate form fields, or for using a calendar to choose a single date, but nothing that accomplishes what the Google Analytics date range selector does. Does anyone know of a good pre-built tool that does this, or am I stuck building it myself?

A: 
Joshua
A: 

Perhaps you could check out jQuery, and the UI library which provides the DatePicker control:

http://jqueryui.com/demos/datepicker/

program247365
A: 

I use this one:

http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker-widgit-update/

An attempt at writing a datePicker (calendar) that is accessible using the keyboard, requires no embedded JavaScript blocks, uses no pop-up windows and is suitable for use within documents served as application/xhtml+xml. A quick feature list…

* Fully keyboard accessible
* Multiple date formats and date dividers supported
* Unobtrusive and nameSpace friendly
* Fully skinnable with CSS
* Both upper and lower date limits can be set
* Certain days of the week can be disabled
* Certain, dates can be disabled/enabled (and wildcards used

to stipulate the dates in question) * Includes “smart” localisation (16 languages currently available) * Bespoke days of the week can be highlighted * Works with single text inputs, split text inputs or select lists * It’s free to use, even commercially (Released under a CC share-alike license)

Diodeus