Skip to content

Commit 8ed0ec7

Browse files
committed
Initialize DateTimeInput component with predefined empty state
1 parent 295ba03 commit 8ed0ec7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/DateTimeInput.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ export default class DateTimeInput extends PureComponent {
109109
return nextState;
110110
}
111111

112-
state = {};
112+
state = {
113+
year: null,
114+
month: null,
115+
day: null,
116+
hour: null,
117+
minute: null,
118+
second: null,
119+
};
113120

114121
// eslint-disable-next-line class-methods-use-this
115122
get dateDivider() {

0 commit comments

Comments
 (0)