2
Answers

Bold only certain (discontinuous) dates in the MonthCalendar

Nel

Nel

11y
2.1k
1
Hello,

I have a list of dates.
Can anybody help me please how to highlight/bold them on the MonthCalendar control?
Here is my code for the list of dates:private void monthCalendar1_DateSelected(object sender, DateRangeEventArgs e)
  {
  richTextBox1.Text += e.Start.ToShortDateString() + "," + Environment.NewLine; 
  i++;
  textBox2.Text = Convert.ToString(i);
  List<DateTime> dates = new List<DateTime>();
  DateTime dt = Convert.ToDateTime(e.Start.ToShortDateString());
  string dt1 = Convert.ToString(dt);
  dt2 = dt1.Substring(0,10);
  dates.Add(dt);
  dati=Convert.ToString(dates);
}

Thank you very much in advance.
Answers (2)