MaterialFX
MaterialFX copied to clipboard
Index Out Of Bound Error When Using MFXDatePicker
Issue Description
A IndexOutOfBoundsException
is thrown when using MFXDatePicker
Steps to Reproduce
1)Create a JavaFX application with an MFXDatePicker 2)Then just try to change the month or year while application is running
MRE
import io.github.palexdev.materialfx.controls.MFXDatePicker;
import io.github.palexdev.materialfx.utils.DateTimeUtils;
import io.github.palexdev.materialfx.utils.others.dates.DateStringConverter;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
public class TestController implements Initializable {
@FXML
private MFXDatePicker dp;
@Override
public void initialize(URL location, ResourceBundle resources) {
dp.setGridAlgorithm(DateTimeUtils::partialIntMonthMatrix);
dp.setConverterSupplier(() -> new DateStringConverter("dd/MM/yyyy", dp.getLocale()));
}
}