Hey gang, I know this is not a VB.NET forum, but I am working on a VB.NET monthly calendar on a form and it's crunch time and I have applied to join a VB.NET forum, but am still awaiting approval. I don't understand why this date range selection is not working correctly. All I want is for the user to choose a start and end date from the month calendar control. When I choose a date it shows the Start date as both the Start and End date and when I choose an End date it shows boths date as being the End date? I think is an easy one, but I am not seeing it. I'll keep researching. Thanks for you help.
Here is my code:
Private Sub SelRange()
Dim sr As New SelectionRange
sr.Start = DateTime.Parse(Me.textBox1.Text)
sr.End = DateTime.Parse(Me.textBox2.Text)
Me.MonthCalendar1.SelectionRange = sr
End Sub
Private Sub monthCalendar1_DateChanged(ByVal sender As Object, _
ByVal e As DateRangeEventArgs) Handles MonthCalendar1.DateChanged
Me.TextBox1.Text = MonthCalendar1.SelectionRange.Start.Date.ToShortDateString()
Me.TextBox2.Text = MonthCalendar1.SelectionRange.End.Date.ToShortDateString()
End Sub
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site:
www.stephenkramer.comWould you believe Far Side Lite?
More than 270 original cartoons.