calendar = Calendar.getInstance();
calendar.setLenient(true);
calendar.setTime(value);
}
CoreInputText month = _createTwoDigitInput(context);
month.setShortDesc("Month");
month.setId(id + "_month");
LongRangeValidator monthRange = _createLongRangeValidator(context);
monthRange.setMinimum(1);
monthRange.setMaximum(12);
month.addValidator(monthRange);
if (value != null)
month.setValue(new Integer(calendar.get(Calendar.MONTH) + 1));
facets.put("month", month);
CoreInputText day = _createTwoDigitInput(context);
day.setShortDesc("Day");
day.setId(id + "_day");
LongRangeValidator dayRange = _createLongRangeValidator(context);
dayRange.setMinimum(1);
dayRange.setMaximum(31);
day.addValidator(dayRange);
if (value != null)
day.setValue(new Integer(calendar.get(Calendar.DAY_OF_MONTH)));
facets.put("day", day);
CoreInputText year = _createTwoDigitInput(context);
year.setShortDesc("Year");
year.setId(id + "_year");
if (value != null)
{
int yearValue = calendar.get(Calendar.YEAR) - 1900;
if (yearValue >= 100)
yearValue -= 100;
year.setValue(new Integer(yearValue));
}
facets.put("year", year);
}