jonotron / angular-date-pickable

An angular date picker with fewer ui opinions
MIT License
1 stars 2 forks source link

Default should be single pickable date, range should be optional #10

Open jonotron opened 9 years ago

jonotron commented 9 years ago

Arguably, most use cases for a date picker is to select a single date. The default behaviour for the directive should be as a single date picker. Picking a date range should be an optional setting.

Possible usage pattern:

<jb-date-pickable 
    selected-date="selectedDate" >
</jb-date-pickable>
<jb-date-pickable
    ranged
    selected-start-date="startDate"
    selected-end-date="endDate">
</jb-date-pickable>

The ranged attribute triggers the date range picker.

jonotron commented 9 years ago

ranged could be implemented as a boolean flag that changes the internal picking mechanisms, or it could be as a behaviour modification that adds or changes the controller behaviour as a dependant directive.