Ember-timerange-picker
WIP
{{timerange-picker interval="15" minTime="06:00" maxTime="12:00" class="time-range-picker" afterDrag=(action "getTimeRange") initFromValue="08:00" initToValue="10:00"}}
Supported attrs:
- Interval: minimal amount of minutes needed to change value (default: 15)
- maxTime: Maximal time (default: 24:00)
- minTime: Minimal time (defualt: 00:00)
- minDuration: Minimal duration that can be picked (defaults to Interval, setting this to 0 is not reccomended)
- maxDuration: Maximum duration that can be picked - WIP
- class: Applied to the whole element
- containerClass: Applied to the internal container element
- afterDrag(fromTime, toTime): Action called after the dragging has ended
- onChange(fromTime, toTime): Action called whenever any value changed
- initFromValue: starting value of the "from" marker // binding not supported atm
- initToValue: starting value of the "to" marker // binding not supported atm
Features
- control + drag for synchronous dragging of both markers (TODO: make it work with cmd button for mac)
The addon does not currently come with styling, feel free to grab this SCSS
* ; .time-range-picker
ToDO
- require chronology
- implement container to provide whitespace
- sync marker movement on ctrlKey
- settable min and max time
- touch support
- improve the code quality of the mouseMove function
- interval set by a param
- set marker width on didInsertElement
- AM/PM format
- minutes format
- onChange function
- write tests
- test the onChange and afterDrag function
- test the interval
- test resize functionality
- test ctrlKey dragging
- test dragging out of range
- test min and max duration
- render into SVG (optionally?)
- settable minDuration
- settable maxDuration
- basic functionality
- sync dragging if limits are reached
- make sure X = limit if limit is reached
- update chronology check when ctrlKey is pressed
- write custom computed macros
- synchronous dragging when dragging space between markers
- styles
- functionality