mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-29 08:16:28 +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
|
/// Pick countdown time
|
||||||
Future<void> _pickCountdownTime() async {
|
Future<void> _pickCountdownTime() async {
|
||||||
final initialDate =
|
final yesterday = DateTime.now().subtract(Duration(days: 1));
|
||||||
_timeEnd == null ? DateTime.now().add(Duration(minutes: 1)) : _timeEnd;
|
|
||||||
|
final initialDate = _timeEnd == null ? DateTime.now() : _timeEnd;
|
||||||
|
|
||||||
// Pick date
|
// Pick date
|
||||||
final newDate = await showDatePicker(
|
final newDate = await showDatePicker(
|
||||||
context: context,
|
context: context,
|
||||||
initialDate: initialDate,
|
initialDate: initialDate,
|
||||||
firstDate: DateTime.now(),
|
firstDate: yesterday.isBefore(initialDate) ? yesterday : initialDate,
|
||||||
lastDate: DateTime.now().add(Duration(days: 5000)));
|
lastDate: DateTime.now().add(Duration(days: 5000)));
|
||||||
|
|
||||||
if (newDate == null) return;
|
if (newDate == null) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user