How to Identify the Current Selected Date at Run Time in Windows Forms MonthCalendarAdv(Classic)
3 Sep 2020 / 1 minute to read
The MonthCalendarAdv gives an array of selected dates. If you want to get only one date, choose the first element from that array. Also, set AllowMultipleSelection property to false
. The DateSelected Event is fired after the user had completed the selection.
private void monthCalendarAdv1_DateSelected(object sender,EventArgs e)
{
// DateSelected event is fired and selected dates will be displayed.
MessageBox.Show("Selected Date: " + monthCalendarAdv1.SelectedDates[0].ToString());
}
Private Sub monthCalendarAdv1_DateSelected(ByVal sender As Object, ByVal e As EventArgs)
' DateSelected event is fired and selected dates will be displayed.
MessageBox.Show("Selected Date: " + monthCalendarAdv1.SelectedDates[0].ToString())
End Sub
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page