TimPicker now uses 24h time format
This commit is contained in:
parent
ce309581ed
commit
baeed584ab
@ -45,15 +45,20 @@ public class CreateEventController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
|
|
||||||
|
StringConverter<LocalTime> defaultConverter = new LocalTimeStringConverter(FormatStyle.SHORT, Locale.GERMANY);
|
||||||
|
|
||||||
JFXTimePicker timePickerStart = new JFXTimePicker();
|
JFXTimePicker timePickerStart = new JFXTimePicker();
|
||||||
timeStart = timePickerStart;
|
timeStart = timePickerStart;
|
||||||
timePickerStart.set24HourView(true);
|
timePickerStart.set24HourView(true);
|
||||||
|
timePickerStart.setConverter(defaultConverter);
|
||||||
timePickerStart.getStyleClass().add("timePicker");
|
timePickerStart.getStyleClass().add("timePicker");
|
||||||
mainGrid.add(timePickerStart, 1 , 3);
|
mainGrid.add(timePickerStart, 1 , 3);
|
||||||
|
|
||||||
JFXTimePicker timePickerEnd = new JFXTimePicker();
|
JFXTimePicker timePickerEnd = new JFXTimePicker();
|
||||||
timeEnd = timePickerEnd;
|
timeEnd = timePickerEnd;
|
||||||
timePickerEnd.set24HourView(true);
|
timePickerEnd.set24HourView(true);
|
||||||
|
timePickerEnd.setConverter(defaultConverter);
|
||||||
timePickerEnd.getStyleClass().add("timePicker");
|
timePickerEnd.getStyleClass().add("timePicker");
|
||||||
mainGrid.add(timePickerEnd, 1 , 4);
|
mainGrid.add(timePickerEnd, 1 , 4);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user