Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hashnuke/delorean

A better date picker.
https://github.com/hashnuke/delorean

Last synced: 24 days ago
JSON representation

A better date picker.

Awesome Lists containing this project

README

        

# Delorean - jQuery datepicker plugin

## Usage

Add delorean as a bower dependency or copy over the files in the `dist` dir.

```
$(selector).datepicker(options)
```

If the value of the input element is set, it'll be parsed.

### Options

* *startingView*: `years` (default), `months`, `days`
* *format*: `yyyymmdd` (default), `mmddyyyy`
* *seperator*: `/` (default). Resulting value would look like `2014/04/05`. To use '-', change this option's value to `-`
* *locale*: `en` (default). English is the only available locale right now

### Events

#### `datepicker:selected`

On selecting a date, this event is triggered with the value (in the format specified) of the selected date as an argument.

Example that handles the event:

```
$(window).on("datepicker:selected", function(event, value) {
// do what you want here
})
```

## Development

The CSS file is in `dist/delorean.css`. The coffeescript source files are in `lib/`

* Install dependencies with `npm install` or install `coffee-script` and `bower` from npm yourself.
* To compile once run `make`
* To watch for changes and compile during development run `make watch`