How to Close the DateTimePickerAdvs Drop Down by Hitting ENTER key or ESC key in Windows Forms DateTimePickerAdv(Classic)

3 Sep 2020 / 1 minute to read

If you want to close the DateTimePickerAdv’s drop-down, when you hit the ENTER key or the ESC key, you need to set DateTimePickerAdv.WantEnterKey property to false.

this.dateTimePickerAdv1.Calendar.WantEnterKey = false;
Me.dateTimePickerAdv1.Calendar.WantEnterKey = False