Skip to content

Commit

Permalink
Fix for issue #270
Browse files Browse the repository at this point in the history
  • Loading branch information
Andris Balodis authored and nickrandolph committed May 11, 2021
1 parent b7c6884 commit 19d400a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/lib/presentation/date_time_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DateTimePicker extends StatelessWidget {
Future<Null> _selectDate(BuildContext context) async {
final picked = await showDatePicker(
context: context,
initialDate: selectedDate != null ? selectDate as DateTime : DateTime.now(),
initialDate: selectedDate != null ? DateTime.parse(selectedDate.toString()) : DateTime.now(),
firstDate: DateTime(2015, 8),
lastDate: DateTime(2101));
if (picked != null && picked != selectedDate && selectDate != null) selectDate!(picked);
Expand Down

0 comments on commit 19d400a

Please sign in to comment.