DatePicker
It is based on the react-datepicker library. Note: Pass a value of null
if you don't want the default value of Date.now()
.
Install and import
Simple use case
Pass props from the original library.
Give an Icon
fr locale
Properties
Name | Type(s) | Default | Required |
---|---|---|---|
autoFocus | bool | ||
dateFormat | string | dd/MM/yyyy | |
disabled | bool | ||
endYear | number | DEFAULT_DATE.getFullYear() | |
icon | union | ||
iconPlacement | right left | left | |
inputRef | func | shape | ||
locale | object | ||
onBlur | func | ||
onChange | func | ||
onFocus | func | ||
placeholder | string | ||
popperProps | object | ||
size | sm md lg | lg | |
startYear | number | 1900 | |
useWeekdaysShort | bool | true | |
value | number | object | string | DEFAULT_DATE |
Dependencies
- - @welcome-ui/date-time-picker-common^3.0.0-alpha.2
- - @welcome-ui/icons.date^3.0.0-alpha.2
- - @welcome-ui/system^3.0.0-alpha.2
- - @welcome-ui/utils^3.0.0-alpha.2
- - react-datepicker^3.4.1
Peer dependencies
- - @xstyled/styled-components^2.1.0
- - prop-types^15.7.2
- - react^16.10.2 || ^17.0.1
- - react-dom^16.10.2 || ^17.0.1
- - styled-components^5.0.0