add end input date and time

This commit is contained in:
Valentin CZERYBA 2024-08-14 23:20:31 +02:00
parent 2d8737743f
commit b2b142ae71

View File

@ -45,6 +45,8 @@ class _UpdateeventImageState extends State<UpdateeventImage>
TextEditingController inputDate = TextEditingController(); TextEditingController inputDate = TextEditingController();
TextEditingController startDatepicker = TextEditingController(); TextEditingController startDatepicker = TextEditingController();
TextEditingController startTimepicker = TextEditingController(); TextEditingController startTimepicker = TextEditingController();
TextEditingController endDatepicker = TextEditingController();
TextEditingController endTimepicker = TextEditingController();
onTapFunctionDatePicker({required BuildContext context}) async { onTapFunctionDatePicker({required BuildContext context}) async {
DateTime? pickedDate = await showDatePicker( DateTime? pickedDate = await showDatePicker(
@ -228,6 +230,32 @@ class _UpdateeventImageState extends State<UpdateeventImage>
hintText: 'Cliquez ici pour selectionner une heure'), hintText: 'Cliquez ici pour selectionner une heure'),
onTap: () => onTapFunctionTimePicker(context: context)), onTap: () => onTapFunctionTimePicker(context: context)),
), ),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: endDatepicker,
readOnly: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Date de fin de l\'évènement',
hintText: 'Cliquez ici pour selectionner une date'),
onTap: () => onTapFunctionDatePicker(context: context)),
),
Padding(
padding: const EdgeInsets.only(
left: 15.0, right: 15.0, top: 15, bottom: 0),
//padding: EdgeInsets.symmetric(horizontal: 15),
child: TextField(
controller: endTimepicker,
readOnly: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Heure de fin de l\'évènement',
hintText: 'Cliquez ici pour selectionner une heure'),
onTap: () => onTapFunctionTimePicker(context: context)),
),
SizedBox( SizedBox(
height: 30, height: 30,
), ),