Skip to content

tavosansal/ember-date-range-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

##date-range Component Documentation

An ember date-range component

This component requires Bootstrap Datepicker and jquery.

The component links two datepicker inputs. When the first datepicker changes, the second datepicker will re-adjust to have the minimum start date to be the date selected from the first datepicker.

If date selected of the first datepicker is greater than the date selected of the second datepicker, the second datepicker will reset it's value. Otherwise it will stay the same.

###Usage

  • Place the date_range_component.js file from the source/components directory inside of your components folder.
  • Place the date-range.hbs file from the source/templates/compoents directory inside your /templates/compoents folder.
  • In your ember template:
{{date-range
        startDate=startDateValue
        endDate=endDateValue
        startLabel="Start Date"
        endLabel="End Date"
        separator="To"}}

Output

datepicker

Reference

Attribute Value Description
startDate null
string
property that binds to the value of the first datepicker in your controller
endDate null
string
property that binds to the value of the second datepicker in your controller
startLabel string The label for the first datepicker
endLabel string The label for the second datepicker
separator string a separator label in-between the two datepickers

About

An ember date-range component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published