PDA

View Full Version : [CLOSED] DateField Culture



ucaneto
Apr 15, 2015, 2:26 AM
Hello.


I have a date field and I am with the problem, typing for example the date 12/01/2019 is more correct if the User type 12012019 to date is 01/12/2019 culture this as Pt-BR would be the correct dd / MM / yyyy



<ext:DateField ID="txtDtCompra" runat="server" Width="220" FieldLabel="Data da Compra" AllowBlank="false" />



in WebConfig


<globalization culture="pt-BR" uiCulture="pt-BR" />

how can I solve the problem?

Ulisses

Daniil
Apr 15, 2015, 4:12 PM
Hi @ucaneto,

You can set AltFormats="ddMMyyyy" for the DateField.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Date-cfg-altFormats

As far as I know locales don't set altFormats.

ucaneto
Apr 15, 2015, 4:21 PM
Hi,
Thank you, it works. You can close this thread.

Ulisses