You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{!-- O --}}{{!-- selected is { start: moment(), end: moment() } or { start: Date, end: Date } --}}{{!--One value and one action. The value is anything that has `start` and `end` keys,but the value passed by the `onSelect` action is a convenient Range object, thatlookis like this:{ date: { start: Date, end: Date }, // POJO like the entry object, with dates moment: { start: moment(), date: moment }, // POJO like the entry object, with moments isMultiMonth: true, // extra data, not sure which one yet isOpen: Boolean, // Probably unneeded since checking if it has an end is enough contains: function(date) { // Some convenience options return Boolean }}The `onSelect` action is fired every time either end of the range changes.--}}
<PowerCalendar
@selected={{selected}}
@onSelect={{action (mutselected) value="date"}} />
Example syntax for sparse sets
{{!-- Selected is an array of Dates --}}{{!-- The value received by the onSelect action is an object with two keys, `date` and `moment`, one containing an array of dates and the other containing an array of moments--}}
<PowerCalendar
@selected={{selected}}
@onSelect={{action (mutselected) value="date")}} />
EXAMPLE OF CONTEXTUAL COMPONENTS API
<PowerCalendar as |calendar|>
<calendar.Days/>
<PowerCalendar as |calendar|>
<calendar.Nav/>
<calendar.Days/>