Hi,@Sphiwe . Welcome Microsoft Q&A. For highlighting multiple dates on the calendar, you could refer to the code below.
Xaml:
241229-highlight-multiple-days-on-calendar.txt
Codebehind:
public class MainViewModel
{
public List<DateTime> Dates { get; } = new List<DateTime>();
public MainViewModel()
{
this.Dates.Add(DateTime.Today);
this.Dates.Add(DateTime.Today.AddDays(1));
this.Dates.Add(DateTime.Today.AddDays(5));
this.Dates.Add(DateTime.Today.AddDays(-3));
}
}
public class MyCalendarConverter : IMultiValueConverter
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
var date = (DateTime)values[0];
var dates = values[1] as List<DateTime>;
return dates.Contains(date);
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
----------------------------------------------------------------------------
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.