Skip to content

Commit 9956d3b

Browse files
committed
Update readme
1 parent 91dad46 commit 9956d3b

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,6 @@
55
# [Demo](https://dmtrkovalenko.github.io/material-ui-datetimepicker/)
66
Component, that joins Material UI`s pickers into the one component, one input and 2 dialogs, appearing one by one.
77

8-
### Breaking change
9-
Due to support of React 16 it was required to change the logic of this component work. Because of each ref should have an owner and material-ui components have refs inside their implementation you should pass created component from material-ui to this datetimepicker via props
10-
11-
*do*
12-
```jsx
13-
import DatePickerDialog from 'material-ui/DatePicker/DatePickerDialog';
14-
import TimePickerDialog from 'material-ui/TimePicker/TimePickerDialog';
15-
16-
<DateTimePicker
17-
onChange={this.setDate}
18-
DatePicker={DatePickerDialog}
19-
TimePicker={TimePickerDialog}
20-
/>
21-
```
22-
238
We are recommending to use your custom wrapper outside of this component to store your custom props, and not pass Dialogs each time you use this package, because it should be solved in one of next material-ui versions
249

2510
### Dependencies
@@ -69,12 +54,12 @@ import DatePickerDialog from 'material-ui/DatePicker/DatePickerDialog';
6954
import TimePickerDialog from 'material-ui/TimePicker/TimePickerDialog';
7055

7156
<DateTimePicker
57+
value={new Date()} // picker value moment/string/number/js Date
7258
format='MMM DD, YYYY hh:mm A'
7359
timePickerDelay={150}
7460
returnMomentDate={false} // if true will return moment object
7561
className='datetime-container'
7662
textFieldClassName='datetime-input'
77-
defaultTime={null} // will accept Date or moment
7863
name='picker' // form value name
7964
datePickerMode='portrait' // or landscape
8065
openToYearSelection={false}

0 commit comments

Comments
 (0)