default value

This commit is contained in:
Valentin CZERYBA 2024-08-17 00:52:33 +02:00
parent 5950050c78
commit da57be9608

View File

@ -163,6 +163,13 @@ class _UpdateeventImageState extends State<UpdateeventImage>
void start() async {
inputName.text = widget.events["name"];
inputPlace.text = widget.events["place"];
DateTime pickedDate =
DateTime.fromMicrosecondsSinceEpoch(widget.events["date"]);
startDatepicker.text = DateFormat("dd-MM-yyyy").format(pickedDate);
endDatepicker.text = DateFormat("dd-MM-yyyy").format(pickedDate);
TimeOfDay pickedTime = TimeOfDay.fromDateTime(pickedDate);
startTimepicker.text = pickedTime.format(context);
endTimepicker.text = pickedTime.format(context);
}
@override