DatePicker
This component is used to pick a date in a calendar
In some forms users should enter a date. And it's very easy to do this with the help of DatePicker. DatePicker shows a date display that is localized and familiar to the user.
Pickers
DatePicker can be used not only for picking a date. You can also pick a month or even an year. To do that you should pass necessary value into picker prop.
Day Picker. DatePicker looks like calendar where you can change a month. When user clicks on day he is able to choose a date. When user clicks on month name he can choose a month and year. For example, when user selects 25 April 2020, value will be Date(2020, 3, 25)
Month Picker. In this mode user can select a month and year. There are two ScrollableSelector with all possible combinations of months and years. For example, when user selects April 2020, value will be Date(2020, 3, 0)
Year Picker. In this mode user can select only a year. There is only one ScrollableSelector with all possible years. For example, when user selects 2020, value will be Date(2020, 0, 0)
Picker
Date range
This feature was added in Altrone 2.1
Upon activating the useDateRange
prop, users gain the capability to choose a pair of dates. Under this configuration, the value
prop assumes the [Date | undefined, Date | undefined]
type, and the onChange
function transmits an array containing the selected dates to you.
Properties <IsDateRange = false>
History
Altrone 2.1
:added
useDateRanges
propredesigned MonthPicker
Altrone 2.0
:added
surface
propadded
elevation
prop
Altrone 1.2
:added
clearable
prop
Altrone 1.1
:added
minDate
propadded
maxDate
prop
Altrone 1.0
: initial release
Last updated