DatePicker TwoWay-Binding CultureInfo

The sdk:DatePicker seems to have an issue when the value entered need to be bound back to the data container.

When showing a value, the current culture info is used. When binding back, always en-US is used. Accordingly, entering the 31st of December fails to bind back, and the 3rd of February is converted to the 2nd of March.

To get the correct value when bound back, one needs to set the language of the DatePicker containing control to the current language.

Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name);

Setting the language in the ctor of the main page saves a lot of work 🙂