[Vtigercrm-commits] [vtiger-commits] r10723 - /vtigercrm/branches/5.0.3/include/js/general.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 18 12:10:54 EDT 2007
Author: richie
Date: Wed Apr 18 10:10:46 2007
New Revision: 10723
Log:
* fixed the issue in birthdate, previously future dates were accespted as birthdate but now we cannot enter future date as birthdate, Fixed #3275
Modified:
vtigercrm/branches/5.0.3/include/js/general.js
Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Wed Apr 18 10:10:46 2007
@@ -886,7 +886,39 @@
}
break;
}
+ //start Birth day date validation
+ if(fieldname[i] == "birthday" && getObj(fieldname[i]).value.replace(/^\s+/g, '').replace(/\s+$/g, '').length!=0 )
+ {
+ var now =new Date()
+ var currtimechk="OTH"
+ var datelabel = fieldlabel[i]
+ var datefield = fieldname[i]
+ var datevalue =getObj(datefield).value.replace(/^\s+/g, '').replace(/\s+$/g, '')
+ if (!dateValidate(fieldname[i],fieldlabel[i],currdatechk))
+ {
+ getObj(datefield).focus()
+ return false
+ }
+ else
+ {
+ datearr=splitDateVal(datevalue);
+ dd=datearr[0]
+ mm=datearr[1]
+ yyyy=datearr[2]
+ var datecheck = new Date()
+ datecheck.setYear(yyyy)
+ datecheck.setMonth(mm-1)
+ datecheck.setDate(dd)
+ if (!compareDates(datecheck,datelabel,now,"Current Date","L"))
+ {
+ getObj(datefield).focus()
+ return false
+ }
+ }
+ }
+ //End Birth day
}
+
}
//added to check Start Date & Time,if Activity Status is Planned.//start
More information about the vtigercrm-commits
mailing list