This question is locked. New answers and comments are not allowed.
Hi,
I'm experiencing difficulties with DatePicker localisation (but just with the displayed date as I have succesfully localised it for Dutch and German for the localisation strings EmptyDateContent, LeapYear, and DatePickerPopupHeader, having put the following line before InitializeComponent() in the constructor of the page hosting the RadDatePicker:
That points to those strings in AppResources.resx, AppResources.nl-NL.resx, and AppResources.de-DE.resx
for English (Default), Dutch, and German, respectively.
But as for the display of the date itself:
For the default English localisation, it is fine, displaying 21-12-1980 minimised and 21 December 1980 maximised.
However for the Dutch Culture, it shows 21-00-1980 minimised but 21 December 1980 maximised. Why the -00- for -12- and how to fix it for NL?
I've checked the Xaml binding with the ViewModel i.e. Value="{Binding DateOfBirth, Mode=TwoWay}" and on the breakpoint in the ViewModel it shows a date of {21-12-1961 0:00:00} for DateOfBirth.
Here's my Xaml:
Any hints?
Kind regards,
Anthony
I'm experiencing difficulties with DatePicker localisation (but just with the displayed date as I have succesfully localised it for Dutch and German for the localisation strings EmptyDateContent, LeapYear, and DatePickerPopupHeader, having put the following line before InitializeComponent() in the constructor of the page hosting the RadDatePicker:
Telerik.Windows.Controls.InputLocalizationManager.Instance.ResourceManager = AppResources.ResourceManager;
That points to those strings in AppResources.resx, AppResources.nl-NL.resx, and AppResources.de-DE.resx
for English (Default), Dutch, and German, respectively.
But as for the display of the date itself:
For the default English localisation, it is fine, displaying 21-12-1980 minimised and 21 December 1980 maximised.
However for the Dutch Culture, it shows 21-00-1980 minimised but 21 December 1980 maximised. Why the -00- for -12- and how to fix it for NL?
I've checked the Xaml binding with the ViewModel i.e. Value="{Binding DateOfBirth, Mode=TwoWay}" and on the breakpoint in the ViewModel it shows a date of {21-12-1961 0:00:00} for DateOfBirth.
Here's my Xaml:
<
telerikInput:RadDatePicker
x:Name
=
"DatePicker"
PopupHeader
=
""
Grid.Column
=
"0"
SelectorFormat
=
"{Binding DatePickerFormat}"
DisplayValueFormat
=
"{Binding DatePickerFormat}"
EmptyContent
=
"{Binding}"
Value
=
"{Binding DateOfBirth, Mode=TwoWay}"
PickerButtonStyle
=
"{StaticResource VCRadDatePickerButtonStyle}"
VerticalAlignment
=
"Top"
CancelButtonIconUri
=
"/Images/Telerik/DateTimePickerCancel.png"
OkButtonIconUri
=
"/Images/Telerik/DateTimePickerOk.png"
telerikCore:InteractionEffectManager.IsInteractionEnabled
=
"False"
><
br
> <
telerikInput:RadDatePicker.EmptyContentTemplate
><
br
> <
DataTemplate
><
br
> <
TextBlock
Text
=
"{Binding DateOfBirthWatermark}"
Foreground
=
"{StaticResource WatermarkTextBrush}"
FontFamily
=
"Segoe WP"
Opacity
=
"0.5"
></
TextBlock
><
br
> </
DataTemplate
><
br
> </
telerikInput:RadDatePicker.EmptyContentTemplate
><
br
> </
telerikInput:RadDatePicker
>
Any hints?
Kind regards,
Anthony