PDA

View Full Version : datefield default behavior of changing the the date automaticaaly



preeti888
6 Nov 2014, 11:56 AM
i have entered the date as 11/31/2014 and it gets automaticcaly converted into 12/1/2014 as soon as i take away the focus and this is a default behavior so if any one help me with this ,

i dont want this change, i want only a tooltip saying invalid date in tooltip.
its URGENT :s

launch: function() {Ext.create('AgentDashboard.view.AgentDashboardViewport');Ext.override('Ext.form.field.Date', {
override:'Ext.form.field.Date',
beforeBlur: function (){
return;
check1
}
});

i have written overrride function in aap.js

but its not working

am i following the correct approach

slemmon
10 Nov 2014, 3:41 PM
Hi,

The datefield's format is dictated by its format config:
http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.form.field.Date-cfg-format

Unless you're overriding it with a locale override in which case it will by default be whatever format the locale override sets.

The best way to set the desired format is to define your own derived datefield class like:

d4l