Repository: flutter
Issue: showDatePicker does not return proper date when firstDate has year < 0.
Labels: f: material design,f: date/time picker,platform-web,has reproducible steps,P3,team-web,triaged-web,found in release: 3.16,found in release: 3.17

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Create new flutter project.
2. Replace the code of main.dart file with the code snippet from this [gist](https://gist.github.com/ParthBaraiya/9880c7da1145bb0a2b32442b861be8cf)
3. Run the app in web.
4. Clock on FAB button.
5. Select the date.
6. Check result.

### Expected results

It should display the exact date that's selected in date picker.

### Actual results

It shows the date with correct month and day but wrong year.

### Code sample

<details><summary>Code sample</summary>

```dart
final newDate = await showDatePicker(
    context: context,
    initialDate: date,
    firstDate: DateTime(-10),
    lastDate: DateTime(3000),
);

print(newDate);
```

</details>


### Screenshots or Video

<details>

https://github.com/flutter/flutter/assets/36261739/fd525ae8-ad44-46b9-ba22-132379ce290c

</details>


### Logs

<details><summary>Logs</summary>
</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.22631.2715], locale en-IN)
    • Flutter version 3.16.0 on channel stable at C:\AppDev\fvm\stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (8 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\AppDev\Android\SDK
    • Platform android-34, build-tools 33.0.0
    • ANDROID_SDK_ROOT = C:\AppDev\Android\SDK
    • Java binary at: C:\AppDev\Android\Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.6)
    • Visual Studio at C:\AppDev\VisualStudio\2022\Community
    • Visual Studio Community 2022 version 17.7.34221.43
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\AppDev\Android\Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.2715]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 119.0.6045.160
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 119.0.2151.72

[√] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>