我正在尝试通过可观察列表
将日期输入到选择框中@FXML
private void addDates(ActionEvent event){
LocalDate startDate = BookingsStartBookingDate.getValue();
LocalDate endDate = BookingsEndBookingDate.getValue();
List<LocalDate> totalDates = new ArrayList<>();
while (!startDate.isAfter(endDate)){
totalDates.add(startDate);
startDate = startDate.plusDays(1);
}
ObservableList<LocalDate> oLocalDate = FXCollections.observableArrayList(totalDates);
breakfastDateChoiceBox.setItems(oLocalDate);
}
我收到的错误是observablelist日期与observablelists字符串不兼容。