mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 12:58:51 +00:00
Fix issue
This commit is contained in:
parent
ee5f791638
commit
8af4a61072
@ -231,14 +231,15 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
|
||||
|
||||
/// Pick countdown time
|
||||
Future<void> _pickCountdownTime() async {
|
||||
final initialDate =
|
||||
_timeEnd == null ? DateTime.now().add(Duration(minutes: 1)) : _timeEnd;
|
||||
final yesterday = DateTime.now().subtract(Duration(days: 1));
|
||||
|
||||
final initialDate = _timeEnd == null ? DateTime.now() : _timeEnd;
|
||||
|
||||
// Pick date
|
||||
final newDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: initialDate,
|
||||
firstDate: DateTime.now(),
|
||||
firstDate: yesterday.isBefore(initialDate) ? yesterday : initialDate,
|
||||
lastDate: DateTime.now().add(Duration(days: 5000)));
|
||||
|
||||
if (newDate == null) return;
|
||||
|
Loading…
Reference in New Issue
Block a user