fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 371 forks source link

Support non-input elements #144

Closed shanesmith closed 5 years ago

jasdeepsingh commented 8 years ago

The same effect can also be achieved by doing something as follows:

Non-Input Element:

<span date-range-picker ng-model='datePicker.date'>
  {{datePicker.date.startDate}} - {{datePicker.date.endDate}}
</span>

In my opinion, it's best to leave the responsibility to customize the view of a non-input element and where the model value is placed with the consumer of the library.

Some examples that I can think of where the custom implementation will come in handy are as follows:

  1. Languages that read right to left (RTL)
  2. Nested markup requires icons
  3. Nested markup requires custom HTML