we tried to check japafx datepicker. Therefore, we use:
if (fromDatePicker.getValue() == null) {
sb.append("No valid from date!\n");
} else {
System.out.println(fromDatePicker.getValue().toString());
if (!DateUtil
.validEnglishDate(fromDatePicker.getValue().toString())) {
sb.append("No valid from date. Use the format yyyy-MM-dd.\n");
}
}
But at the moment it is not possible to get an invalid date with datepicker, because the whole invalid date changes to the initial value. So, we asked us, is it possible to get an invalid date with javafx datikiper?
***** EDIT *****
Example: we have the following datepicker: DatePicker [2015-05-12] now we have entered "fjdfk" in the DatePicker, so we have: DatePicker [fjdfk] when saving data, the automatic date picker switches to DatePicker [2015-05-12]
source
share