Files
cfs-Tracker/Services/CalendarStateService.cs
T
Djagor d85f2e0fb3 Farbpalette vorladen lassen
Bootstraper läd jetzt die farbeinstellung sofort und nicht nachträglich

cleanup and rework

PDF switch to HTML

export fix

Colorsystem

Farben für knöpfe hinzugefügt als anpassung

button color

button color primary and secondary change
2026-03-24 21:59:59 +01:00

25 lines
562 B
C#

namespace cfs_tracker.Services;
public class CalendarStateService
{
private DateTime _selectedDate = DateTime.Today;
public event Action<DateTime>? SelectedDateChanged;
public DateTime SelectedDate
{
get => _selectedDate;
set
{
var normalized = value.Date;
if (_selectedDate == normalized)
return;
_selectedDate = normalized;
SelectedDateChanged?.Invoke(_selectedDate);
}
}
public void ResetToToday() => SelectedDate = DateTime.Today;
}