Hi, I'm having a problem with the date format when I parse a date and its doesn't show the right date.
I set RadDatePicker Culture to fr-CA xaml side. and my application culture + cultureUI is set to fr-CA
I parse 03/07/2015 --> it shows 2015-03-07 = March 07 2015 it should be July 03 2015 (2015-07-03)
CodeSnipet Below.
<
telerik:RadDatePicker
Grid.Column
=
"1"
Grid.Row
=
"1"
Style
=
"{StaticResource leftRadDatePicker_style}"
Name
=
"dateFacture"
DateTimeWatermarkContent
=
"{x:Static resources:Facture.DateWaterMark}"
SelectedDate
=
"{Binding DateFacture, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,NotifyOnValidationError=True}"
> </
telerik:RadDatePicker
>
<
Style
TargetType
=
"telerik:RadDatePicker"
x:Key
=
"leftRadDatePicker_style"
>
<
Setter
Property
=
"Height"
Value
=
"36"
/>
<
Setter
Property
=
"FontSize"
Value
=
"16"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Top"
/>
<
Setter
Property
=
"Culture"
Value
=
"fr-CA"
/>
<
Setter
Property
=
"Margin"
Value
=
"20,5,20,0"
/>
<!--<Setter Property="Template" Value="{DynamicResource RadDatePickerControlTemplate}"/>-->
<
Setter
Property
=
"Validation.ErrorTemplate"
>
<
Setter.Value
>
<
ControlTemplate
>
<
StackPanel
>
<!-- Placeholder for the TextBox itself -->
<
AdornedElementPlaceholder
x:Name
=
"textbox"
/>
<
TextBlock
Text
=
"{Binding [0].ErrorContent}"
Style
=
"{StaticResource ErrorText_style}"
/>
</
StackPanel
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
<
Style.Triggers
>
<
Trigger
Property
=
"IsKeyboardFocusWithin"
Value
=
"True"
>
<
Setter
Property
=
"IsDropDownOpen"
Value
=
"True"
/>
</
Trigger
>
</
Style.Triggers
>
</
Style
>
Thread.CurrentThread.CurrentCulture =
new
CultureInfo(ConfigurationManager.AppSettings[
"Culture"
]);
//Is fr-CA
Thread.CurrentThread.CurrentUICulture =
new
CultureInfo(ConfigurationManager.AppSettings[
"Culture"
]);
//Is fr-CA