Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.
-
Sencha User
DateField validation in 3.0.0 RC 2
DateField validator error
Version(s) of Ext GWT
Ext GWT 3.0 Release Candidate 2
Browser versions and OS
Firefox 10 Windows 7
Virtual Machine
No
Description
It look when I picked date value from picker and then I click save button on form then on validation in method:
validate(Editor<Date> editor, Date value)
value is null.
But when after picking date from picker and then clicking save button on form the DateField value is not null. It worked fine in previous versions of library.
Test case
Code:
DateField fromDate = new DateField();
fromDate.setAllowBlank(false);
fromDate.addValidator(new Validator<Date>() {
@Override
public List<EditorError> validate(Editor<Date> editor, Date value) {
Date toDateVal = toDate.getCurrentValue();
if(value.after(toDateVal)){
List<EditorError> errorList = new ArrayList<EditorError>();
errorList.add(new DefaultEditorError(editor, "Invalid date", value));
return errorList;
}
return null;
}
});
-
Sencha User
Thanks for the report and the test case. It looks like an engineer has already begun looking into this issue. I've attached this thread to issue EXTGWT-1915, and will update here with any changes we make.
-
Sencha User
This is now fixed in SVN. You can see the updated code here:
http://staging.sencha.com:8080/examp...e:formsexample
-
Sencha User
The fix for this bug has been included in the public release of Sencha GXT 3.0.0. You should now see the fix included in the GXT Explorer demo.