fix(widget-date): fix default value for nested date widget (#1859)

This commit is contained in:
Bartholomew
2018-11-06 19:13:42 +01:00
committed by Shawn Erquhart
parent f69a04efe8
commit d8f888706e
2 changed files with 9 additions and 10 deletions

View File

@ -30,7 +30,9 @@ export default class DateControl extends React.Component {
* empty string means the value is intentionally blank.
*/
if (!value && value !== '') {
this.handleChange(new Date());
setTimeout(() => {
this.handleChange(new Date());
}, 0);
}
}