Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
278
XamDateTimeEditor set date problem.
posted

Hello, 

1)I try set 20.12.09 date. But after i write 0, datePicker go in month section, and if i write then i get 02.01.0209.

are you  faced with this problem?

2)If i already write 02.12.2009 and want correct "02" (date section) after clear i can write only one number or "0 + one number" (01, 02, 03 ... but not 10, 11, 12, ...)

Thanks.

  • 27093
    posted

    Hello,

    If you enter the month first and the day second you'll get the date you want. This is a specific string formatting for the US-culture. To get what you want you can either change the formatting culture or set your own formatting by setting the mask property of the xamDateTimeEditor (if you are using a xamDataGrid the xamEditor is embeded in every cell)

    Mask="dd/mm/yy" , Mask="dd/yyyy/mm" etc...

    or in the grid

    <igDP:Field.Settings>
               <igDP:FieldSettings EditorStyle="{StaticResource TheStyle1}" EditAsType="{x:Type sys:DateTime}" />
    </igDP:Field.Settings>

    where the style is :

    <Style TargetType="{x:Type igEditors:XamMaskedEditor}" x:Key="TheStyle1">
          <Setter Property="Mask" Value="dd/mm/yy" />
    </Style>

    Hope this helps.

    Best Regards Petar.