fix(ui): start date should also be validated

This commit is contained in:
Łukasz Mierzwa
2018-08-15 20:47:34 +01:00
parent 4c7706aeba
commit 80caa12f30
+5
View File
@@ -114,6 +114,11 @@ class SilenceFormStore {
},
verifyStarEnd() {
const now = moment().second(0);
if (this.startsAt.isBefore(now)) {
this.startsAt = now;
}
if (this.endsAt.isSameOrBefore(this.startsAt)) {
this.endsAt = moment(this.startsAt).add(1, "minutes");
}