use of org.activityinfo.model.type.time.LocalDateInterval in project activityinfo by bedatadriven.
the class DateIntervalFieldWidget method getValue.
private LocalDateInterval getValue() {
Date startDate = startDateBox.getValue();
Date endDate = endDateBox.getValue();
if (startDate != null && endDate != null && (startDate.equals(endDate) || startDate.before(endDate))) {
return new LocalDateInterval(new LocalDate(startDate), new LocalDate(endDate));
} else {
// TODO: how do we signal the container that the value is invalid?
return null;
}
}
Aggregations