Skip to content

Commit

Permalink
Fix not working parse with moment utils
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Mar 16, 2018
1 parent 483c8dc commit 4de89ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/Examples/Demo/CustomDateTimePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IconButton, Icon, InputAdornment } from 'material-ui';

export default class CustomDateTimePicker extends PureComponent {
state = {
selectedDate: new Date(),
selectedDate: new Date('2018-01-01 18:54'),
}

handleDateChange = (date) => {
Expand Down
4 changes: 3 additions & 1 deletion lib/src/utils/moment-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export default class MomentUtils {
this.locale = locale;
}

parse = this.moment
parse(value, format) {
return this.moment(value, format);
}

date(value, formatString) {
return this.moment(value, formatString);
Expand Down

0 comments on commit 4de89ab

Please sign in to comment.