use of com.vaadin.client.DateTimeService in project cuba by cuba-platform.
the class CubaDateFieldWidget method adjustStringValue.
protected String adjustStringValue(String value) {
DateTimeService service = getDateTimeService();
Date date = service.parseDate(value, getFormatString(), lenient);
Date adjustedDate = adjustDateByRange(date, getDateRangeStart(), getDateRangeEnd());
return date.equals(adjustedDate) ? value : service.formatDate(adjustedDate, getFormatString());
}
Aggregations