0

we have application which is accessed worldwide. and we set the default date format. The server set the time zone of the San Fransisco. Here the control used to display date in mm/dd/yyyy

 <telerik:RadDatePicker Width="90" x:Name="dtpCashflowDate" Height="18" DateTimeText="{Binding Path=NewTransferDetail.TransferDate,Mode=TwoWay,ValidatesOnDataErrors=True,StringFormat=\{0:d\}}" InputMode="DatePicker">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="GotFocus">
            <ei:CallMethodAction MethodName="NewRecord_GotFocus" TargetObject="{Binding}" ></ei:CallMethodAction>
        </i:EventTrigger>
    </i:Interaction.Triggers>
</telerik:RadDatePicker>

Now one of the organization office in Bangkok show the date in dd/mm/yyyy. How its possible.

Giulio Caccin
  • 2,962
  • 6
  • 36
  • 57
user3785359
  • 23
  • 1
  • 3

2 Answers2

1

With StringFormat=\{0:d\} you set the control to show the short date pattern. If your application is set in another culture the short date will change accordingly.

Please control which format you need in this microsoft article, then change the StringFormat or the Culture property in the way you need.

Remember: you can also set the format in all the istances of your application by specifying a custom format, regardless of the culture of your application, by setting StringFormat=\{0:mm/dd/yyyy\}.

Giulio Caccin
  • 2,962
  • 6
  • 36
  • 57
0

This is because of the culture that is set to the DatePicker..

<telerik:RadDatePicker culture="jap"> 

or the culture for bangkok(japanese in this case), Uses the default format used by that culture.

Jay Nirgudkar
  • 426
  • 4
  • 18