validateValue : function(value)
{
+ if(this.getVisibilityEl().hasClass('hidden')){
+ return true;
+ }
+
if(value.length < 1) {
if(this.allowBlank){
return true;
return false;
}
-// if (this.endDate !== Infinity) {
-// this.endDate = this.parseDate(this.endDate);
-// }
+ if(typeof(this.parseDate(value)) == 'undefined'){
+ return false;
+ }
+
+ if (this.endDate !== Infinity && this.parseDate(value).getTime() > this.endDate.getTime()) {
+ return false;
+ }
+
+ if (this.startDate !== -Infinity && this.parseDate(value).getTime() < this.startDate.getTime()) {
+ return false;
+ }
+
return true;
},
+
+ setVisible : function(visible)
+ {
+ if(!this.getEl()){
+ return;
+ }
+
+ this.getEl().removeClass('hidden');
+
+ if(visible){
+ return;
+ }
+
+ this.getEl().addClass('hidden');
+ }
});