Stabilize beta release with warning cleanup and edge-case fixes

This commit is contained in:
Trey t
2026-02-22 13:18:14 -06:00
parent fddea81e36
commit ec2bbb4764
55 changed files with 712 additions and 315 deletions

View File

@@ -362,18 +362,15 @@ struct DateRangePickerSheet: View {
Section {
Button("Next 7 Days") {
startDate = Date()
endDate = Calendar.current.date(byAdding: .day, value: 7, to: Date()) ?? Date()
applyQuickRange(days: 7)
}
Button("Next 14 Days") {
startDate = Date()
endDate = Calendar.current.date(byAdding: .day, value: 14, to: Date()) ?? Date()
applyQuickRange(days: 14)
}
Button("Next 30 Days") {
startDate = Date()
endDate = Calendar.current.date(byAdding: .day, value: 30, to: Date()) ?? Date()
applyQuickRange(days: 30)
}
}
}
@@ -394,6 +391,15 @@ struct DateRangePickerSheet: View {
}
}
}
private func applyQuickRange(days: Int) {
let calendar = Calendar.current
let start = calendar.startOfDay(for: Date())
let endDay = calendar.date(byAdding: .day, value: days, to: start) ?? start
let end = calendar.date(bySettingHour: 23, minute: 59, second: 59, of: endDay) ?? endDay
startDate = start
endDate = end
}
}
// MARK: - Schedule Diagnostics Sheet