Dim cal As WinForm.Calendar = e.Form.Controls("Calendar1")
Dim ct = cal.basecontrol
Dim lst As new List(of Date)
lst.AddRange(ct.BoldedDates)
If lst.Contains(e.Sender.Value) Then
lst.Remove(e.Sender.Value)
Else
lst.Add(e.Sender.Value)
End If
ct.BoldedDates = lst.ToArray
获取选中日期
Dim cal As WinForm.Calendar = e.Form.Controls("Calendar1")
Dim ct = cal.basecontrol
For Each d As Date In ct.BoldedDates
msgbox(d)
Next
清空选择
Dim cal As WinForm.Calendar = e.Form.Controls("Calendar1")
Dim ct = cal.basecontrol
ct.BoldedDates = Nothing
[此贴子已经被作者于2017/4/11 9:08:32编辑过]