Greetings,
The trouble is that it does not seem to have any effect as the default validation still happens and it says "* is not a valid date - it must be in the format of m/d/Y"
I am using ExtJs 4.2 to input a start and end date range. Both these fields use the default format 'm/d/Y'. I have these fields working and validating properly in the current release. I just got a feature request to have these fields also accept '*' as valid input as a wildcard character.
The trouble I am having is getting the validation working with this. In consulting the documentation for datefield I found the validator config option which says it will allow the devloper to override the default validation process. I have implemented this config and return true in the case of a * as shown:
Code:
{
xtype: 'datefield',
cls: 'js_query_date_start',
format: 'm/d/Y',
validator: function(value){
if(value === '*'){
return true;
}
},
The trouble is that it does not seem to have any effect as the default validation still happens and it says "* is not a valid date - it must be in the format of m/d/Y"
Any one have any other thoughts on how to get this to work?
Did I read the documentation wrong or is it incorrect?
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire