DateTimeControl ondatechanged event not firing

I have a DateTimeControl with an ondatechanged event. When I change the day the event is triggered, but when I change the hour in the dropdown the event does not fire, how can I do that?

Many thanks,

+3


source to share


1 answer


Place the following lines of code in the event Page_Load

foreach (Control c in dtControl.Controls)
{
  if (c is DropDownList) 
  { 
    ((DropDownList)c).AutoPostBack = true; 
    ((DropDownList)c).SelectedIndexChanged += SomeEvent; 
  }
} 

      



Link: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.datetimecontrol_events.aspx

+2


source







All Articles