PDA

View Full Version : How overwrite default date validation?



simonr26
18 Dec 2011, 4:28 PM
Hello,


I have a form with a datefield which carries out default validation
in the format: "m/d/Y"
I require validation and also rendering to be in format: "d/m/Y".
Please can you indicate the best/easiest way to do this?

kind regards,
Simon

skirtle
18 Dec 2011, 9:38 PM
There are examples at the top of the docs for datefield explaining how to do this:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Date

You should be able to do what you want using the config setting format, or possibly altFormats:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Date-cfg-format
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.field.Date-cfg-altFormats