WUI logo

DateTimePicker

Allows user to select a predefined date and time.

version

5.14.0

install

yarn add @welcome-ui/date-time-picker

usage

import { DateTimePicker } from '@welcome-ui/date-time-picker'

About #

It is based on the react-datepicker library. All the props the library exposes can be passed to either DatePicker or TimePicker.

Note: Pass a value of null if you don't want the default value of Date.now().

Usage #

Pass a date for the value

Pass props to childs #

If you want to pass props to DatePicker or TimePicker you need to see example below

Sizes #

Use size propety with option:

  • xs (24px)
  • sm (32px)
  • md (40px - default)
  • lg (48px)

Transparent #

Pass transparent to remove background-color and border-color

Properties #

NameType(s)DefaultRequired
onChange
((date?: Date) => void) & ((date?: Date) => void)
value
string
Date
transparent
Boolean
locale
Locale
Locale & string
size
"xs"
"sm"
"md"
"lg"
md

Packages #

Dependencies #
Peer dependencies #