PDA

View Full Version : DateField


tbSwo
03-23-2007, 08:38 PM
I'm trying to calculate the number of days between the two selected dates and show it as a number. ex. date2 - date1 = #ofdays

Heres my file:
http://home.comcast.net/~tom.bentz/datechooser.fla

Heres the AS:
function oneffdateChange ( eventObj : Object ) : Void
{
var myDataHolder = eventObj.target;
var hiredate : Number = myDataHolder.hiredate;
var effdate : Number = myDataHolder.effdate;
var daysLabel : Number = myDataHolder.daysLabel;
var daysLabel : Number = effdate -= hiredate;
myDataHolder.daysLabel = daysLabel;
}
myDataHolder.addEventListener ( "daysLabel", oneffdateChange );