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

yarn add @welcome-ui/date-picker @xstyled/styled-components prop-types react react-dom styled-components
import { DatePicker } from '@welcome-ui/date-picker'

Simple use case

{
"welcome": 1593679202950
}

Pass props from the original library.

{
"welcome2": 1593679202960
}

Give an Icon

{
"welcome3": 1593679202964
}

fr locale

Properties

NameType(s)DefaultRequired
autoFocus
bool
dateFormat
string
dd/MM/yyyy
disabled
bool
endYear
number
DEFAULT_DATE.getFullYear()
icon
union
iconPlacement
right
left
left
inputRef
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

Peer dependencies