fix ai date
This commit is contained in:
@@ -52,8 +52,10 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
||||
{required BuildContext context, required String position}) async {
|
||||
DateTime? pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
firstDate: DateTime.fromMicrosecondsSinceEpoch(widget.events["date"]),
|
||||
initialDate: DateTime.fromMicrosecondsSinceEpoch(widget.events["date"]),
|
||||
firstDate:
|
||||
DateTime.fromMicrosecondsSinceEpoch(widget.events["timestamp"]),
|
||||
initialDate:
|
||||
DateTime.fromMicrosecondsSinceEpoch(widget.events["timestamp"]),
|
||||
lastDate: DateTime(2104));
|
||||
if (pickedDate == null) return;
|
||||
if (position == "start") {
|
||||
@@ -163,13 +165,13 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
||||
void start() async {
|
||||
inputName.text = widget.events["name"];
|
||||
inputPlace.text = widget.events["place"];
|
||||
print(widget.events["timestamp"]);
|
||||
DateTime pickedDate =
|
||||
DateTime.fromMicrosecondsSinceEpoch(widget.events["date"]);
|
||||
DateTime.fromMicrosecondsSinceEpoch(widget.events["timestamp"]);
|
||||
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);
|
||||
startTimepicker.text = DateFormat("HH-mm").format(pickedDate);
|
||||
endTimepicker.text = DateFormat("HH-mm").format(pickedDate);
|
||||
}
|
||||
|
||||
@override
|
||||
|
Reference in New Issue
Block a user