Search This Blog

Wednesday, May 8, 2019

WPF Calendar SelectedDates

WPF->Calendar

Add multiple selected dates to WPF Calendar.

<Grid>
   <Calendar x:Name="calendar" />

</Grid>

calendar.SelectionMode = CalendarSelectionMode.MultipleRange; 
calendar.SelectedDates.Add(new DateTime(2020, 1, 1)); 
calendar.SelectedDates.Add(new DateTime(2020, 1, 2));