Trigger must always be DATE-TIME

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2020-03-31 11:50:51 +02:00
parent 412bde8ee4
commit 0b27b62feb
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
1 changed files with 3 additions and 0 deletions

View File

@ -1177,6 +1177,9 @@ const mutations = {
changeAlarmFromRelativeToAbsolute(state, { calendarObjectInstance, alarm }) {
if (alarm.alarmComponent) {
const triggerDateTime = calendarObjectInstance.eventComponent.startDate.clone()
// The trigger of an alarm must be DATE-TIME, startDate can be either.
triggerDateTime.isDate = false
triggerDateTime.addDuration(alarm.alarmComponent.trigger.value)
alarm.alarmComponent.setTriggerFromAbsolute(triggerDateTime)