mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
修复 date 初始值问题
This commit is contained in:
parent
2183e65c83
commit
416b8c4019
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user