How to make Monday start day in DatePicker Calendar Java - JavaFX

235 Views Asked by At

I'm working on an application and using JavaFX. I am using the built-in DatePicker but the calendar starts from Sunday, as visible on the image below. How to make the calendar start on Monday?

enter image description here

1

There are 1 best solutions below

0
Tarik Mujcic On

I found a solution for this:

@FXML 
private DatePicker date;

//In the initialize method you can use the following code:

@Override
public void initialize(URL location, ResourceBundle resources) {
    date.setOnShowing(e -> Locale.setDefault(Locale.Category.FORMAT, Locale.UK));
    //...
}