Articles in this section

How to configure WinForms DateTimePicker (DateTimePickerAdv) so that date entry is consistent with the grid cell?

 

This is not supported by the DateTimePickerAdv, but this functionality can easily be achieved using the ComboBoxDropDown and the MonthCalendarAdv controls

Events

Set the popup control of the ComboBoxDropDown as MonthCalendrAdv and then handle the Leave event

C#

private void comboDropDown1_Leave(object sender, System.EventArgs e)
{
   DateTime dTime = DateTime.Parse(this.comboDropDown1.Text);
   this.monthCalendarAdv1.Value = dTime;
}

 

VB

Private Sub comboDropDown1_Leave(ByVal sender As Object, ByVal e As System.EventArgs)
   Dim dTime As DateTime = DateTime.Parse(Me.comboDropDown1.Text)
   Me.monthCalendarAdv1.Value = dTime
End Sub

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied