limestone/DayPicker
Limestone styled day picker components.
Loading Live Preview
Loading Live Preview
Members
Section titled “Members ”DayPicker Component
Section titled “DayPicker   Component ”A day of the week selection component, ready to use in Limestone applications.
By default, DayPicker maintains the state of its selected property. Supply the
selected property to control its initial value. If you wish to directly control updates
to the component, supply a value to selected at creation time and update it in response to
onChange events.
Usage:
<DayPicker
selected={[2, 3]}
onSelect={handleSelect}
/> Extends:
limestone/DayPickerlimestone/DayPicker.DayPickerBase
Wrapped with:
ui/Changeableui/Changeable.Changeable
Properties
disabled
Section titled “disabled”Disables all days in this picker.
disabled
Section titled “disabled”Disables DayPicker and the control becomes non-interactive.
Default: falseonSelect
Section titled “onSelect”Called when a day is selected or unselected.
The event payload will be an object with the following members:
selected- An array of numbers representing the selected days, 0 indexed where Sunday is represented by 0
An array of numbers (0 indexed where Sunday is 0) representing the selected days of the week.
The initial value used when selected is not set.
aria-label
Section titled “aria-label”The "aria-label" for the component.
By default, "aria-label" is set to the full names of the selected days or the custom text when the weekend, week days, or all days is selected.
DayPickerBase Component
Section titled “DayPickerBase   Component ”A day of the week selection component.
This component is most often not used directly but may be composed within another component as it is within limestone/DayPickerlimestone/DayPicker.DayPicker.
Extends:
ui/Groupui/Group.Group
getSelectedDayString Function
Section titled “getSelectedDayString   Function ”getSelectedDayString( selected, {noneText}, {dayNameLength} ) → StringDetermines whether it should return "Every Day", "Every Weekend", "Every Weekday" or list of days for a given selected day type.
3 Params
- selected any
Selected day(s)
- Optional • noneText Stringdefault: ''
String to be returned when no days are selected
- Optional • dayNameLength Stringdefault: 'long'
The format for names of days
Returns
- String
"Every Day", "Every Weekend", "Every Week", list of days or
noneText