PDA

View Full Version : [UNKNOWN][3.x] Cleared datefields still POSTs data



djSeverin
8 Dec 2009, 6:09 PM
Version is latest ExtJS Svn for 3.0.x branch as at 13/11/2009;
Adapter is Ext;
Browser is Firefox 3.5.2

==== BUG REPORT =============================================

I am using two datefield's to specify Start and End dates for a reporting app.

PROBLEM:
* datefield is populated with a date (either via date picker or keyboard);
* the date that was entered gets POSTed, even if the datefield has been cleared ...

By "cleared", I mean backspacing or highlighting the date and pressing delete, leaving the date field empty (containing no visible value).

This behavior seems incorrect.

I have checked to ensure there are no dupicate ID's etc.

I have also searched the forums and it seems that everyone that runs into this just tacks on a "clear" button.

I believe this is a bug and also reference
http://www.extjs.com/forum/showthread.php?p=416481#post416481


==== CODE SNIPPIT ==========================================


{
xtype : 'fieldset',
title : 'Report Dates',
layout :'column',
anchor :'-20',
items:[{
columnWidth :.5,
layout: 'form',
items : [
{
xtype : 'datefield',
format : 'd/m/Y',
fieldLabel : 'Start Date',
id : 'report_startDate',
vtype : 'daterange',
endDateField : 'report_endDate',
anchor : '-10',
allowBlank : true
}
]
},{
columnWidth :.5,
layout: 'form',
items : [{
xtype : 'datefield',
format : 'd/m/Y',
fieldLabel : 'End Date',
id : 'report_endDate',
vtype : 'daterange',
startDateField : 'report_startDate',
anchor : '-10',
allowBlank : true
}]
}]
}

evant
8 Dec 2009, 6:17 PM
Does the suggested fix in that other thread work for you?

djSeverin
8 Dec 2009, 6:19 PM
At first glance it appears to, though Firefox is now randomly giving "Script running for too long" warnings when the form data is POSTed.

Still working to find out of this is a direct result of the override or another unrelated problem.

djSeverin
21 Dec 2009, 3:55 PM
Fix was a little more involved then originally thought. Have posted the details to the other thread (http://www.extjs.com/forum/showthread.php?t=87197)