Quote:
<DatePicker ... Text="{Binding SelectedProduct.DateApplication, Mode=TwoWay}" />
You are binding the date picker's
Text
property[
^]. You need to bind
the SelectedDate
property[
^] instead.
<DatePicker ... SelectedDate="{Binding SelectedProduct.DateApplication, Mode=TwoWay}" />
When you bind to the
Text
property, your
DateTime
value is converted to a string using the current culture settings. The WPF binding then uses
the US English culture to try to convert that string back to a
DateTime
.
This "feature" of WPF binding - which many would
(correctly) argue is actually a bug - has been around for over a decade:
WPF Bindings and CurrentCulture Formatting - Rick Strahl's Web Log[
^]
Binding with Respect to CurrentCulture[
^]