PDA

View Full Version : two date fields in a form collapse when we select one of the datefields



sachin sachdeva
15 Nov 2010, 3:13 AM
hello sir when i select the above date field the lower date field got same validation as above date fields now plz tell me where i am wrong my code is given below.here you can see that min value for both the dates are different but if explicitly select datefield two then it works fine but if select date field 1 and date field 2 then min value of date field one is piced

new Ext.form.DateField( {
fieldLabel : 'Release Date',
format: 'd/m/Y', //DD/MM/YYYY
name : 'releaseDate',
id: 'releaseDate',
vtype: 'daterange',
vtypeText:'date should be in dd/mm/yyyy format',
region: 'center',
editable:false,
//width:163,
//value:breleaseDate,
expiryDateField: 'expiryDate',
minValue : (new Date()).clearTime(),
allowBlank :true
}),
new Ext.form.DateField( {
fieldLabel : 'Expiration Date',
format: 'd/m/Y', //DD/MM/YYYY
name : 'expiryDate',
id : 'expiryDate',

vtypeText:'date should be in dd/mm/yyyy format',
region: 'center',
//width:163,
editable:false,
//value:bexpiryDate,
allowBlank : true,
minValue : (new Date().add(Date.DAY, 1)).clearTime(),
releaseDateField: 'releaseDate'
}),