Merge pull request #304 from 2betop/master

修复 date 初始值问题
This commit is contained in:
liaoxuezhi 2019-10-24 10:40:04 +08:00 committed by GitHub
commit e8deb8c822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -40,12 +40,12 @@ export default class DateControl extends React.PureComponent<DateProps> {
const {minDate, maxDate, value, defaultValue, setPrinstineValue, data, format} = this.props;
if (defaultValue && value === defaultValue) {
setPrinstineValue(filterDate(defaultValue, data).format(format));
setPrinstineValue(filterDate(defaultValue, data, format).format(format));
}
this.setState({
minDate: minDate ? filterDate(minDate, data) : undefined,
maxDate: maxDate ? filterDate(maxDate, data) : undefined
minDate: minDate ? filterDate(minDate, data, format) : undefined,
maxDate: maxDate ? filterDate(maxDate, data, format) : undefined
});
}