Commit e554cb9a authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Kalendar now auto rounds new due dates for taskss to nearest next 15 mins

parent 6701810f
Pipeline #102154 passed with stage
in 4 minutes and 27 seconds
......@@ -329,7 +329,11 @@ Kirigami.ScrollablePage {
} else if(incidenceForm.isTodo && oldDate) {
root.incidenceWrapper.incidenceEnd = oldDate
} else if(incidenceForm.isTodo) {
root.incidenceWrapper.incidenceEnd = new Date()
let start = new Date();
let startInMsecsSinceEpoch = start.getTime();
const quarterHourInMsecs = 15 * 60 * 1000;
const nearestQuarterHourStart = startInMsecsSinceEpoch + (quarterHourInMsecs - startInMsecsSinceEpoch % quarterHourInMsecs);
root.incidenceWrapper.incidenceEnd = new Date(nearestQuarterHourStart);
}
}
visible: incidenceForm.isTodo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment