i close monthcalender control when i chose to navigate the month
Posted on 2014-04-15
I have this code, but when I choose to navigate the month it set the .SelectionRange.Start to the date of that new month and therefore closes. I want it stay until I have finished the navigation through the months. I am think of comparing current month with new month before I close. Is there a better and direct way.
Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged
If (MonthCalendar1.SelectionRange.Start & "").Trim.Length > 0 Then
adate.Text = MonthCalendar1.SelectionRange.Start
MonthCalendar1.Visible = False
adate.Text = ""