Fixed edit-event
This commit is contained in:
parent
34e51cb72f
commit
0522908001
@ -28,15 +28,15 @@ public class CreateEventController {
|
|||||||
@FXML
|
@FXML
|
||||||
protected JFXComboBox<String> comboBoxPriority;
|
protected JFXComboBox<String> comboBoxPriority;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton toggleBtnIsFullDay;
|
protected JFXToggleButton toggleBtnIsFullDay;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton toggleBtnIsPrivate;
|
protected JFXToggleButton toggleBtnIsPrivate;
|
||||||
@FXML
|
@FXML
|
||||||
private Label labelError;
|
private Label labelError;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTimePicker timeStart;
|
protected JFXTimePicker timeStart;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTimePicker timeEnd;
|
protected JFXTimePicker timeEnd;
|
||||||
|
|
||||||
|
|
||||||
public CreateEventController() {
|
public CreateEventController() {
|
||||||
|
@ -4,6 +4,8 @@ import helper.HttpRequestException;
|
|||||||
import container.DataController;
|
import container.DataController;
|
||||||
import container.Event;
|
import container.Event;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
|
||||||
public class EditEventController extends CreateEventController{
|
public class EditEventController extends CreateEventController{
|
||||||
|
|
||||||
private Event currentEvent;
|
private Event currentEvent;
|
||||||
@ -19,7 +21,17 @@ public class EditEventController extends CreateEventController{
|
|||||||
datePickerDate.setValue(currentEvent.getDate().toLocalDate());
|
datePickerDate.setValue(currentEvent.getDate().toLocalDate());
|
||||||
comboBoxPriority.getSelectionModel().select(currentEvent.getPriority());
|
comboBoxPriority.getSelectionModel().select(currentEvent.getPriority());
|
||||||
|
|
||||||
//timeEnd.setValue(currentEvent.getEnd());
|
try{
|
||||||
|
timeStart.setValue(LocalTime.parse(currentEvent.getStart()));
|
||||||
|
}catch (Exception e){}
|
||||||
|
|
||||||
|
|
||||||
|
try{
|
||||||
|
timeEnd.setValue(LocalTime.parse(currentEvent.getEnd()));
|
||||||
|
}catch (Exception e){}
|
||||||
|
|
||||||
|
toggleBtnIsFullDay.setSelected(currentEvent.isFullDay());
|
||||||
|
toggleBtnIsPrivate.setSelected(currentEvent.isPrivate());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user