---
title: DatePicker
sidebar_label: DatePicker
---
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
# DatePicker
The DatePicker component from Superset's UI library.
## Live Example
## Try It
Edit the code below to experiment with the component:
```tsx live
function Demo() {
return (
);
}
```
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `placeholder` | `string` | `"Select date"` | - |
| `showNow` | `boolean` | `true` | Show "Now" button to select current date and time. |
| `allowClear` | `boolean` | `false` | - |
| `autoFocus` | `boolean` | `true` | - |
| `disabled` | `boolean` | `false` | - |
| `format` | `string` | `"YYYY-MM-DD hh:mm a"` | - |
| `inputReadOnly` | `boolean` | `false` | - |
| `picker` | `string` | `"date"` | - |
| `placement` | `string` | `"bottomLeft"` | - |
| `size` | `string` | `"middle"` | - |
| `showTime` | `any` | `{"format":"hh:mm a","needConfirm":false}` | - |
## Import
```tsx
import { DatePicker } from '@superset/components';
```
---
:::tip[Improve this page]
This documentation is auto-generated from the component's Storybook story.
Help improve it by [editing the story file](https://github.com/apache/superset/edit/master/superset-frontend/packages/superset-ui-core/src/components/DatePicker/DatePicker.stories.tsx).
:::