DateTimeInput control displays popup calendar which allows date selection and which also contains Clear and Today buttons at the bottom which clear entered date and select today’s date. If you wish to attach event handlers to either of these buttons (Clear button is named “sysClearSelectionButton” and Today button is named “sysTodayButton“) use following code from Form.Load event:


private void Form1_Load(object sender, EventArgs e)
   MonthCalendarItem mc = dateTimeInput1.MonthCalendar;
   ButtonItem clearButton = (ButtonItem)BarFunctions.GetSubItemByName(mc, "sysClearSelectionButton");
   clearButton.Click += new EventHandler(ClearButtonClick);
void ClearButtonClick(object sender, EventArgs e)
    Console.WriteLine("Clear Button Clicked");


Private Sub Form1_Load(sender As Object, e As EventArgs)
	Dim mc As MonthCalendarItem = dateTimeInput1.MonthCalendar
	Dim clearButton As ButtonItem = DirectCast(BarFunctions.GetSubItemByName(mc, "sysClearSelectionButton"), ButtonItem)
	clearButton.Click += New EventHandler(AddressOf ClearButtonClick)
End Sub
Private Sub ClearButtonClick(sender As Object, e As EventArgs)
	Console.WriteLine("Clear Button Clicked")
End Sub

Related posts:

  1. How to Make DotNetBar for WinForms Floating Docking Windows Translucent
  2. Accessing Internal Bar TabStrip Control
  3. How to display any control on popup
  4. How to show custom Tooltip for Schedule Appointments
  5. How To Create NavigationPane Buttons Using Code