DatePicker doesn't support setting of firstDayOfWeek. It (or better: its kin, which is using DatePickerContent to present the day grid) takes that property from the application default Locale.
To force a deviation of the default firstDayOfWeek for any given Locale, we can build a new Locale from the default and set its new value via an extension:
public static Locale adjustWeekStart(Locale locale, DayOfWeek day) {
String dayString = day.toString().substring(0, 3);
Locale weekStart = new Locale.Builder()
.setLocale(locale)
.setExtension(Locale.UNICODE_LOCALE_EXTENSION, "fw-" + dayString)
.build();
return weekStart;
}
Note: the key "fw" is specified in WeekFields.of(Locale), the value being the first three letters of the day name is taken from the implementation of CalendarDataUtility (please edit if that's specified somewhere ;)
Now we can use that modified Locale as default and get DatePickers with a modified firstDayOfWeek:
public class DatePickerExperiments extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Locale.setDefault(adjustWeekStart(Locale.getDefault(), DayOfWeek.SATURDAY));
DatePicker datePicker = new DatePicker();
Scene scene = new Scene(new HBox(datePicker), 300, 240);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}