2023-06-13 13:28:02 +00:00
|
|
|
# DateTimePicker
|
|
|
|
|
|
|
|
Date-time input
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
```js
|
2023-12-25 08:49:09 +00:00
|
|
|
import { DateTimePicker } from "@docspace/shared/components";
|
2023-06-13 13:28:02 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<DateTimePicker
|
|
|
|
onChange={onChange}
|
|
|
|
selectDateText={t("SelectDate")}
|
|
|
|
className="datePicker"
|
2023-07-05 09:15:34 +00:00
|
|
|
id="datePicker"
|
2023-06-13 13:28:02 +00:00
|
|
|
/>
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Properties
|
|
|
|
|
2023-07-14 15:13:31 +00:00
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ---------------- | :--------------: | :------: | :----: | :-----------------------: | ------------------------------------------------ |
|
|
|
|
| `className` | `string` | - | - | '' | Allows to set classname |
|
|
|
|
| `id` | `string` | - | - | - | Allows to set id |
|
|
|
|
| `onChange` | `func` | - | - | - | Allow you to handle changing events of component |
|
|
|
|
| `initialDate` | `date`, `string` | - | - | - | Default date |
|
|
|
|
| `selectDateText` | `string` | - | - | "Select date" | Select date text |
|
|
|
|
| `locale` | `string` | - | - | `User's browser settings` | Browser locale |
|
|
|
|
| `maxDate` | `date`, `string` | - | - | - | Maximum date that the user can select. |
|
|
|
|
| `minDate` | `date`, `string` | - | - | - | Minimum date that the user can select. |
|
|
|
|
| `hasError` | `boolean` | - | - | - | Minimum date that the user can select. |
|
2023-07-18 11:24:15 +00:00
|
|
|
| `openDate` | `date`, `string` | - | - | - | Allows to set first shown date in calendar |
|