PDA

View Full Version : datefiled



swamy
6 Apr 2011, 10:30 PM
DateTimeFormat dateTimeFormat=DateTimeFormat.getFormat("MM-dd-yyyy");
setFreezedateField.getPropertyEditor().setFormat(dateTimeFormat);

hi datefiled is accepting year as anything as 201122 i need to validate it.means restrict to only 4digits.help me

raj_plays
7 Apr 2011, 11:15 AM
{
xtype: 'datefield',
maxLength: 10,
format: 'm-d-Y',
width: 90,
value: new Date().clearTime()
}

swamy
8 Apr 2011, 2:44 AM
ya thanks i solved it by keeping length>10