Fix date adjustments when scheduling meeting

This commit is contained in:
QuentinArguillere 2024-04-19 17:43:34 +02:00
parent 269eeba480
commit 352cfae6f5

View file

@ -451,7 +451,7 @@ struct ScheduleMeetingFragment: View {
}
func pickDate() {
let duration = scheduleMeetingViewModel.fromDate.distance(to: scheduleMeetingViewModel.toDate)
let duration = min(scheduleMeetingViewModel.fromDate.distance(to: scheduleMeetingViewModel.toDate), 86400) // Limit auto correction of dates to 24h
if setFromDate {
scheduleMeetingViewModel.fromDate = selectedDate
// If new startdate is after previous end date, bump up the end date