 		var dateObj:Object = {day:"", month:"", year:""};
 		
 		var dayProp:String = baseField;
+		var monthProp:String = baseField;
 		var yearProp:String = baseField;
-		var monthProp:String = baseField;
-
-		var advanceValueCounter:Boolean = true;
+		
+		var dateParts:Array = [];
+		var formatParts:Array = [];
+		
+		var dayPart:String = "";
+		var monthPart:String = "";
+		var yearPart:String = "";
+
 		var monthRequired:Boolean = false;
 		var dayRequired:Boolean = false
 		var yearRequired:Boolean = false;

			}
			else
			{
				var len:Number = stringValue.length;
				if (len < inputFormat.length - 2 || len > inputFormat.length + 2)
				{
					results.push(new ValidationResult(
						true, baseField, "wrongLength",
						validator.wrongLengthError + " " + inputFormat));
					return results;
				}
 
 				var j:int = 0;
				n = inputFormat.length;
				for (i = 0; i < n; i++)
				{
					temp = "" + stringValue.substring(j, j + 1);
					var mask:String = "" + inputFormat.substring(i, i + 1);
					
					// Check each character to see if it is allowed.
					if (validInput.indexOf(temp) == -1)
					{
						results.push(new ValidationResult(
							true, baseField, "invalidChar",
							validator.invalidCharError));
						return results;
					}
					if (mask == "m" || mask == "M")
					{
						monthRequired = true;
						if (isNaN(Number(temp)))
							advanceValueCounter = false;
						else
							dateObj.month += temp;
					}
					else if (mask == "d" || mask == "D")
					{
						dayRequired = true;
						if (isNaN(Number(temp)))
							advanceValueCounter = false;
						else
							dateObj.day += temp;
					}
					else if (mask == "y" || mask == "Y")
					{
						yearRequired = true;
						if (isNaN(Number(temp)))
						{
							results.push(new ValidationResult(
								true, baseField, "wrongLength", 
								validator.wrongLengthError + " " +
								inputFormat));
							return results;
						}
						else
						{
							dateObj.year += temp;
						}
					}
					else if (allowedFormatChars.indexOf(temp) == -1)
					{
						results.push(new ValidationResult(
							true, baseField, "invalidChar", 
							validator.invalidCharError));
						return results;
					}
					
					if (advanceValueCounter)
						j++;
					advanceValueCounter = true;	
				}
				
				if ((monthRequired && dateObj.month == "") ||
					(dayRequired && dateObj.day == "") ||
					(yearRequired && dateObj.year == "") ||
					(j != len))
				 {
				 	results.push(new ValidationResult(
						true, baseField, "wrongLength", 

			}
		}

		if (results.length > 0)
			return results;
		
		var monthNum:Number = Number(dateObj.month);
		var dayNum:Number = Number(dateObj.day);
		var yearNum:Number = Number(dateObj.year);

		if (monthNum > 12 || monthNum < 1)
		{
