This is a migrated thread and some comments may be shown as answers.

For Dutch Culture, DatePicker shows 21-00-1980 minimised byt 21 December 1980 maximised, yet English Culture 21-12-1980 min and 21 December 1980 max

3 Answers 34 Views
DatePicker and DateSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anthony
Top achievements
Rank 1
Anthony asked on 12 Dec 2012, 02:17 PM
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:

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

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 15 Dec 2012, 11:40 AM
Hi Anthony,

We've handled your ticket. Please take a look at it.

As soon as we come up with a solution for the case, we will also update this thread to help other people who might come across it.

Kind regards,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Anthony
Top achievements
Rank 1
answered on 17 Dec 2012, 09:23 AM
Thanks Deylan!
0
Deyan
Telerik team
answered on 20 Dec 2012, 09:32 AM
Hello Anthony,

This is a quick follow-up with some further information about the issue you have reported here.

The reason for the undesired behavior hides in the Date Time Format you have provided for the Dutch culture specifically. The format is dd/mm/yyyy. Here, the lower-case mm stays for Minutes and therefore you see 00 instead of 12 or whatever month is selected. You should change this to upper-case MM in order to designate the months portion of the DateTime structure:

dd/MM/yyyy

I hope this helps.

Kind regards,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DatePicker and DateSelector
Asked by
Anthony
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Anthony
Top achievements
Rank 1
Share this question
or