How to detect when the date is changed in WinForms DateTimePicker (DateTimePickerAdv)?
Value changed event
When the Date is changed in WinForms DateTimePicker, the notification is obtained handling the ValueChanged event. This event can be handled using the following code examples.
C#
private void dateTimePickerAdv1_ValueChanged(object sender, EventArgs e) { MessageBox.Show("The selected date is " + dateTimePickerAdv1.Value.ToShortDateString()); }
VB
Private Sub dateTimePickerAdv1_ValueChanged(sender As Object, e As EventArgs) MessageBox.Show("The selected date is " + dateTimePickerAdv1.Value.ToShortDateString()) End Sub
Sample Link
Conclusion
I hope you enjoyed learning about how to detect when the date is changed in WinForms DateTimePicker (DateTimePickerAdv).
You can refer to our WinForms DateTimePicker’s feature tour page to know about its other groundbreaking feature representations.
For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms DateTimePicker and other WinForms components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!