1 | @# Date time picker
|
2 |
|
3 | `DateTimePicker` composes a [`DatePicker`](#datetime/datepicker)
|
4 | and a [`TimePicker`](#datetime/timepicker) into one container.
|
5 |
|
6 | <div class="@ns-callout @ns-intent-danger @ns-icon-error">
|
7 | <h5 class="@ns-heading">
|
8 |
|
9 | Deprecated: use [Date picker](#datetime/datepicker)
|
10 | </h5>
|
11 |
|
12 | This component is **deprecated since @blueprintjs/datetime v3.2.0** with the addition
|
13 | of `<DatePicker>` `timePrecision` and `timePickerProps` props to trivially
|
14 | compose time selection with the existing date selection.
|
15 |
|
16 | </div>
|
17 |
|
18 | @reactExample DateTimePickerExample
|
19 |
|
20 | @## Props
|
21 |
|
22 | Use the `onChange` prop to listen for changes to the selected date and time. You
|
23 | can control the selected date and time by setting the `value` prop, or use the
|
24 | component in uncontrolled mode and specify an initial day by setting
|
25 | `defaultValue`. (If `defaultValue` is not set, the current date and time is used
|
26 | as the default.)
|
27 |
|
28 | You can pass props to the inner `DatePicker` and `TimePicker` components using
|
29 | `datePickerProps` and `timePickerProps`, respectively.
|
30 |
|
31 | ```tsx
|
32 | import { DateTimePicker } from "@blueprintjs/datetime";
|
33 |
|
34 | <DateTimePicker value={this.state.date} onChange={this.handleDateChange} />
|
35 | ```
|
36 |
|
37 | @interface IDateTimePickerProps
|