Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/live627/livedate

Visual date picker script.
https://github.com/live627/livedate

Last synced: 1 day ago
JSON representation

Visual date picker script.

Awesome Lists containing this project

README

        

# livedate [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) [![Build Status](https://travis-ci.org/live627/livedate.svg?branch=master)](https://travis-ci.org/live627/livedate) [![Code Climate](https://codeclimate.com/github/live627/livedate/badges/gpa.svg)](https://codeclimate.com/github/live627/livedate) [![Support](https://supporter.60devs.com/api/b/axlsj1o8o0amepfrr5eqlcjza)](https://supporter.60devs.com/give/axlsj1o8o0amepfrr5eqlcjza)

Visual date picker script. Very compact at under 2KB minified and gzipped.

**Demo**: http://live627.github.io/livedate

## Installation

Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.

```sh
npm install livedate --save
```

## Usage
```




Livedate by live627





var
days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
daysShort = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],
months = ['January','February','March','April','May','June','July','August','September','October','November','December'],
monthsShort = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
new Livedate(document.getElementById('date'));

```

## Tests

```sh
npm install
npm test
```

## Build

`npm install` to grab all the dependenceies

`npm run build` uglify and minify JS, compile SASS into CSS and minify it

## Dependencies

None

## Goals
My goals with this script are:
- to keep it as lean and readable as possible
- to NOT have jQuery as a dependency

## Dev Dependencies

- [mkdirp](https://github.com/substack/node-mkdirp): Recursively mkdir, like `mkdir -p`
- [node-sass](https://github.com/sass/node-sass): Wrapper around libsass
- [watch](https://github.com/mikeal/watch): Utilities for watching file trees.

## Sources
This work is based on [jQuery Tools Dateinput](http://jquerytools.github.io/documentation/dateinput/index.html).

## TODO

- Use the scroll wheel to change months.
- Build tests