Skip to main content
Version: Next

DatePicker

The DatePicker component from Superset's UI library.

Live Example

Loading component...

Try It

Edit the code below to experiment with the component:

Live Editor
function Demo() {
  return (
    <DatePicker
      placeholder="Select date"
      format="YYYY-MM-DD hh:mm a"
      showNow
      showTime={{ format: 'hh:mm a', needConfirm: false }}
    />
  );
}
Result
Loading...

Props

PropTypeDefaultDescription
placeholderstring"Select date"-
showNowbooleantrueShow "Now" button to select current date and time.
allowClearbooleanfalse-
autoFocusbooleantrue-
disabledbooleanfalse-
formatstring"YYYY-MM-DD hh:mm a"-
inputReadOnlybooleanfalse-
pickerstring"date"-
placementstring"bottomLeft"-
sizestring"middle"-
showTimeany{"format":"hh:mm a","needConfirm":false}-

Import

import { DatePicker } from '@superset/components';

Improve this page

This documentation is auto-generated from the component's Storybook story. Help improve it by editing the story file.