UNPKG

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