From baeed584ab9795c9f7f5d8ec2608e97ff0210921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20K=C3=BChn?= Date: Fri, 14 Jan 2022 10:14:17 +0100 Subject: [PATCH] TimPicker now uses 24h time format --- client/app/src/main/java/main/CreateEventController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/app/src/main/java/main/CreateEventController.java b/client/app/src/main/java/main/CreateEventController.java index 132d8af..f3359c8 100644 --- a/client/app/src/main/java/main/CreateEventController.java +++ b/client/app/src/main/java/main/CreateEventController.java @@ -45,15 +45,20 @@ public class CreateEventController { @FXML public void initialize() { + + StringConverter defaultConverter = new LocalTimeStringConverter(FormatStyle.SHORT, Locale.GERMANY); + JFXTimePicker timePickerStart = new JFXTimePicker(); timeStart = timePickerStart; timePickerStart.set24HourView(true); + timePickerStart.setConverter(defaultConverter); timePickerStart.getStyleClass().add("timePicker"); mainGrid.add(timePickerStart, 1 , 3); JFXTimePicker timePickerEnd = new JFXTimePicker(); timeEnd = timePickerEnd; timePickerEnd.set24HourView(true); + timePickerEnd.setConverter(defaultConverter); timePickerEnd.getStyleClass().add("timePicker"); mainGrid.add(timePickerEnd, 1 , 4); }