title: Flutter - InputDatePickerFormField
body: <p>I'm trying to add a text field that will get the date in the input field. I'm using InputDatePickerFormField widget. The issue I'm finding that it does not show error when the date is incorrect.</p>
  <p>Here is my code:</p>
  <pre><code>class _BirthDay extends StatefulWidget {
    @override
    __BirthDayState createState() =&gt; __BirthDayState();
  }
  
  class __BirthDayState extends State&lt;_BirthDay&gt; {
    DateTime? selectedDate;
  
    @override
    Widget build(BuildContext context) {
      final firstDate = DateTime(DateTime.now().year - 120);
      final lastDate = DateTime.now();
  
      return InputDatePickerFormField(
        firstDate: firstDate,
        lastDate: lastDate,
        fieldLabelText: '${AppLocalizations.of(context)!.dateOfBirth}',
        errorFormatText: '${AppLocalizations.of(context)!.dateOfBirthInvalid}',
        errorInvalidText: '${AppLocalizations.of(context)!.dateOfBirthInvalid}',
        onDateSubmitted: (date) {
          print(date);
          setState(() {
            selectedDate = date;
          });
        },
        onDateSaved: (date) {
          print(date);
          setState(() {
            selectedDate = date;
          });
        },
      );
    }
  }
  </code></pre>