PDA

View Full Version : ability to turn off date correction in form.datefield



jenniferh
11 Nov 2010, 11:11 AM
Hi,

I am looking for a way to turn off the auto-correction of badly inputted (typo) dates (e.g., 12/35/2010 changes to 01/04/2011; 22/12/2010 changes to 10/12/2011). I would rather display a tooltip error than have the input change on users.

I have looked high and low for a config change or other solution and can't find one. Apologies if I somehow missed the info in the API. Help much appreciated, since I don't have time (or skill) to write this type of custom code.

Best,

Jennifer

Screamy
11 Nov 2010, 12:58 PM
I pulled some hair out over this same problem, until I stumbled across the 'useStrict' property of Ext's overloaded Date object. Somewhere in the initial setup of your app, issue this command and the problem is solved:


Date.useStrict = true

Thx.

jenniferh
11 Nov 2010, 2:03 PM
You are the best! Thank you!

spsextjs
16 Jul 2015, 7:03 PM
I pulled some hair out over this same problem, until I stumbled across the 'useStrict' property of Ext's overloaded Date object. Somewhere in the initial setup of your app, issue this command and the problem is solved:


Date.useStrict = true

Thx.

-----------------

extjs version: 4.0.7
IE version: IE11
Ext.Date.useStrict=true;
It works for Chrome. But it does not work for IE. Any suggestion for this?