From 02fa9f0647c57621fc2bc91a6c15c92bced4aab5 Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Wed, 6 Feb 2019 08:33:11 +0100 Subject: [PATCH] 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] --- .../js/src/newsletters/types/notification/scheduling.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assets/js/src/newsletters/types/notification/scheduling.jsx b/assets/js/src/newsletters/types/notification/scheduling.jsx index aebad4a8a3..3ce5e5988d 100644 --- a/assets/js/src/newsletters/types/notification/scheduling.jsx +++ b/assets/js/src/newsletters/types/notification/scheduling.jsx @@ -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);