I'm having issues with the DatePicker control. It's driven me nuts, so maybe y'all have seen this before and can help me out.
So here's the problem: No matter what date I pick, it always returns today's date! Here's the code below, and a screenshot (for the non-believers!),
Code:
Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles cmdOK.Click
MessageBox.Show(dtpDueDate.DisplayDate())
End Sub
The WPF forum is over here. I will ask a mod to move it for you as this question directly relates a specific WPF control and not a control from Windows Forms.
DisplayDate is a confusing property... I think it's for situations where you want to preserve the user's selection but possibly display another date? Either way, its default value is Today (per documentation) and it isn't what you want. Use the SelectedDate property instead. This is spelled out clearly in the example in the documentation.