Home > database >  How we can use time and date picker together in flutter?
How we can use time and date picker together in flutter?

Time:03-15

I want to show date and time picker together but I think no any widget or lib provides this feature in flutter. Any suggestion or solution ?

CodePudding user response:

Try flutter_datetime_picker here hope its help to you.

In this package you want to pick date and time both.

Try date_time_picker package also

CodePudding user response:

There is a package and it's also null safety.

TextButton(
onPressed: () {
    DatePicker.showDatePicker(context,
                          showTitleActions: true,
                          minTime: DateTime(2019, 3, 5),
                          maxTime: DateTime(2022, 1, 1), onChanged: (date) {
                      }, onConfirm: (date) {
                        print('Confirmed $date');
                      }, currentTime: DateTime.now(), locale: LocaleType.it);
},
child: Text(
    'Show Datetime picker (italian)',
    style: TextStyle(color: Colors.blue),
));
  • Related