An input allowing to chose a date range. inspired by the one used on the homepage of airbnb
ng-model: the variable to bind toformat: the format of the ng-model variable, moment, date or any formatusable
by momentjs, default momentstart-property: will edit this property as the start, default startend-property: will edit this property as the end, default endexclude-end : if you want the end of the range in your scope to be excluded, default falsemin: self explainatorymax: self explainatorydisable-keyboard-input: unused inline, a self explainatory boolean, default falsecustom-class: a function taking in a moment and returnung a string to apply specific classes to some daysdisplay-format: used when the popover is open to display each date in its tag, uses format ifyou
provided any or the format L if you didn'tshortcuts: unused inline, a list of objects { label: "string", "your-start-property": "your format of date", "your-end-property": "your format of date" } to be displayed under the calendars to easily select a certain daterangegrouped-shortcuts: unused inline, like shortcuts but you want them displayed on several linesfor
consistency, for example you want on one line yesterday, today, tomorrow andon
another last week, this week, next week
<luid-daterange-picker ng-model="myRange"></luid-daterange-picker> <luid-daterange-picker ng-model="myRange" min="min" max="max" custom-class="disableWeekends"></luid-daterange-picker> <luid-daterange-picker ng-model="myRange" start-property="foo" end-property="bar"></luid-daterange-picker> <luid-daterange-picker ng-model="myRange" min="'2016-05-01'" format="YYYY-MM-DD"></luid-daterange-picker>
basic usage
start: {{ myDaterange.start }} - end: {{ myDaterange.end }}
with end excluded and weekend disabled
start: {{ myDaterange2.start | luifMoment }} - end: {{ myDaterange2.end | luifMoment }}
with custom start and end properties (foo and bar), an exotic format, a different display format, a min and a max
foo: {{ myDaterange3.foo }} - bar: {{ myDaterange3.bar }}
With keyboard input enabled
start: {{ myDateRange4.start }} - end: {{ myDateRange4.end }}