rangepicker
v0.3.5
Published
Date Range Comparison Picker
Downloads
13
Maintainers
Readme
rangepicker
Date Range Comparison Picker
a simple jQuery date picker, useful especially for selecting two date ranges for comparison
Library uses MomentJS for date handling.
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install rangepicker --save
Usage
Datepicker container
<div id="datepicker" style="float: right"></div>
Activate rangepicker
<script>
$('#datepicker').rangepicker(options);
</script>
Options
These options can be specified:
<Selecting>
maxDate:
'Max selectable date'
'Format: YYYY-MM-DD'
'Default: none'
minDate:
'Min selectable date'
'Format: YYYY-MM-DD'
'Default: none'
futureEnabled:
'If not, only allow dates until today'
'Format: boolean'
'Default: true'
months:
'Number of months displayed on datepicker'
'Format: int'
'Default: 3'
lastMonthDisplayed:
'Last month displayed on datepicker'
'Format: YYYY-MM-DD'
'Default: this month'
<Intervals>
defaultStart,
defaultEnd,
defaultCompareStart,
defaultCompareEnd:
'Initial intervals.'
'Format: YYYY-MM-DD'
'Defaults: last week and week before'
defaultCompareType:
'There are three compare interval types: custom, mirror and lastYear'
'Format: string'
'Default: custom'
<Callbacks>
onChange
onHide
onShow
onMonthChange
No options are required.
Dependencies
Dev Dependencies
- autoprefixer: Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website
- babel-cli: Babel command line.
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babelify: Babel browserify transform
- browser-sync: Live CSS Reload & Browser Syncing
- browserify: browser-side require() the node way
- eslint: An AST-based pattern checker for JavaScript.
- eslint-config-standard: JavaScript Standard Style - ESLint Shareable Config
- eslint-plugin-promise: Enforce best practices for JavaScript promises
- eslint-plugin-standard: ESlint Plugin for the Standard Linter
- less: Leaner CSS
- npm-run-all: A CLI tool to run multiple npm-scripts in parallel or sequential.
- onchange: Use glob patterns to watch file sets and run a command when anything is added, changed or deleted.
- postcss-cli: CLI for postcss
- uglify-js: JavaScript parser, mangler/compressor and beautifier toolkit
- watchify: watch mode for browserify builds
License
ISC
Generated by package-json-to-readme