How to Display DateTimePickeradv Control Programmatically in Windows Forms DateTimePickerAdv(Classic)

28 Apr 20211 minute to read

This page explains How to display DateTimePickerAdv control programmatically and more details.

How to display DateTimePickerAdv control programmatically?

We can display the Calendar programmatically on a button click. The DisplayCalendar method should be called from the click event handler in order to show the control.

private void button1_Click(object sender, System.EventArgs e)
{
   // Shows the calendar.
   this.dateTimePickerAdv1.DisplayCalendar();
}
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
   ' Shows the calendar.
   Me.dateTimePickerAdv1.DisplayCalendar()
End Sub