FXML on datepicker
@FXML private DatePicker dp_detay_cal;
pojo.setFirstDate(dp_detay_cal.getValue());
error: localdate cannot be converted date
how to converted
FXML on datepicker
@FXML private DatePicker dp_detay_cal;
pojo.setFirstDate(dp_detay_cal.getValue());
error: localdate cannot be converted date
how to converted
The preferred solution would be to use a
LocalDateas the type for yourfirstDateproperty in your pojo class.A
java.util.Dateincludes more information that aLocalDate; it includes a time (of day) and a time zone. So you need to include some values for those before you can convert to aDate.If, for some reason, you can't change the pojo class, try