Set default day in post notification

If user doesn't select a day they see 1st in the UI but
because the action is onChange which never fired
the system remembers the default value 0

[MAILPOET-1781]
This commit is contained in:
Pavel Dohnal
2019-02-06 08:33:11 +01:00
committed by M. Shull
parent eea9f7fb4e
commit 02fa9f0647

View File

@ -52,7 +52,13 @@ class NotificationScheduling extends React.Component {
});
};
handleIntervalChange = event => this.handleValueChange('intervalType', event.target.value);
handleIntervalChange = (event) => {
const intervalType = event.target.value;
this.handleValueChange('intervalType', intervalType);
if (intervalType === 'monthly') {
this.handleValueChange('monthDay', '1');
}
}
handleTimeOfDayChange = event => this.handleValueChange('timeOfDay', event.target.value);