I have 2 image buttons that when clicked change their respective calendars to visible.
A date is selected. The calendar reverts to hidden, the date populates a textbox and that text box becomes visible.
Then the user does this same process on the 2nd image button.
These represent a start date and an end date. I have a compare validator that ensures end date is > start date.
All of the above works fine.
However if end date > start date and the user is prompted to repick their dates... clicking on the image buttons will not show the calendars again. Nothing happens. There is if postback code.
Here is my code behind. Can anyone see why the events are only fired/handled the first times?
Partial Class _InputRound
Protected Sub imgPin1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgPin1.Click
CalDate1.Visible = True
Protected Sub CalDate1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalDate1.SelectionChanged
txtStartDate.Text = CalDate1.SelectedDate
CalDate1.Visible = False
txtStartDate.Visible = True
Protected Sub imgPin2_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgPin2.Click
CalDate2.Visible = True
Protected Sub CalDate2_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalDate2.SelectionChanged
txtEndDate.Text = CalDate2.SelectedDate
CalDate2.Visible = False
txtEndDate.Visible = True