d85f2e0fb3
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
25 lines
562 B
C#
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;
|
|
}
|