Date picker
Allows users to select a date from an interactive calendar.
- Date selection trigger button.
- Month and Year header.
- Previous and Next navigation.
- Day abbreviation.
- Date selection.
Month and Year picker
The basic function of fate picker is to allow use to pick a date easily. What if user wanted to select a date more than years into the past? Here is where the month and year picker comes in. It consist of 3 views:
- Day view - Show the day of the month
- Month view - Show the months of year
- Year view - Show a group of 18 years
- To navigate to Month view, click the
{Month}
header. - To navigate to Year view, click the
{YYYY}
header. - Click again on
{Month}
header OR{Mon}
list to go back to Day view. - Click again on
{YYYY}
header OR{YYYY}
list to go back to Day view.
Navigate in between views
Day view
- Go to previous (-1) month.
- Go to next (+1) month.
Month view
- Go to previous (-1) year.
- Go to next (+1) year.
Year view (Group by 18 years.)
- Scroll up and down throughout the years.
Language
- English
- Malay
Single date selection
- Using Button Type: Secondary default state when user can navigate to previous month.
- Using Button Type: Secondary disabled state when user cannot navigate forward. Typically when filtering data only up to latest date.
- Using Button Type: Tertiary disabled state when the date is from previous month. User can still select since it’s from previous month.
- Using Button Type: Tertiary default state indicating the date is ready to be selected.
- Using Button Type: Tertiary hover state when cursor move on the date.
- Using Button Type: Primary default state when a date is selected.
- Using Button Type: Tertiary disabled state when the date is not interactive. User cannot select date ahead of latest date.
Range date selection
- Date selection trigger button (From & To).
- From date selection.
- To date selection.
- Range selection highlight.
- Date hover state in highlighted range. Use bg-primary-200 for highlighted colour.