Fix Date Control Regression
Fix regression from b7fcb8b. Dates were disappearing completely until the field was clicked into.
This commit is contained in:
parent
d5cd79f2c4
commit
77a7c369f3
@ -20,9 +20,10 @@ export default class DateControl extends React.Component {
|
|||||||
includeTime: PropTypes.bool,
|
includeTime: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
format = this.props.field.get('format') || (this.props.includeTime ? DEFAULT_DATETIME_FORMAT : DEFAULT_DATE_FORMAT);
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { includeTime, value, field, onChange } = this.props;
|
const { value } = this.props;
|
||||||
this.format = field.get('format') || (includeTime ? DEFAULT_DATETIME_FORMAT : DEFAULT_DATE_FORMAT);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the current date as default value if no default value is provided. An
|
* Set the current date as default value if no default value is provided. An
|
||||||
|
Loading…
x
Reference in New Issue
Block a user