We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatePicker
Describe the bug March 2024 has only 30 days instead of 31 days in DatePicker.
To Reproduce See the demo page:
Additional context The problem occurs in the method _getDaysInMonth in the file date_picker.dart:
_getDaysInMonth
date_picker.dart
return DateTimeRange( start: DateTime(year, month), end: DateTime(year, month + 1), ).duration.inDays;
Reproducing it for March 2024 it returns 30:
30
return DateTimeRange( start: DateTime(2024, 3), end: DateTime(2024, 3 + 1), ).duration.inDays;
But using DateTime.utc returns correctly 31:
DateTime.utc
31
return DateTimeRange( start: DateTime.utc(2024, 3), end: DateTime.utc(2024, 3 + 1), ).duration.inDays;
The text was updated successfully, but these errors were encountered:
2b4afb3
No branches or pull requests
Describe the bug
March 2024 has only 30 days instead of 31 days in
DatePicker
.To Reproduce
![Bildschirmfoto 2024-04-01 um 13 01 27](https://private-user-images.githubusercontent.com/32225614/318417863-0d0b3371-ae1e-4ad7-9297-a5d624b2e838.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzEzMTgsIm5iZiI6MTczOTY3MTAxOCwicGF0aCI6Ii8zMjIyNTYxNC8zMTg0MTc4NjMtMGQwYjMzNzEtYWUxZS00YWQ3LTkyOTctYTVkNjI0YjJlODM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxNTY1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThiYmVhOGZmNDFjNmRhZjA2YTc3OTFhNDllOTIyZWNkMGRmNjk3MjRmNjk1YTE3MDQ2ZDY5NWJmYzM4ZjcyNjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yj_-kDbYji_fgkk5wX8pxnk8alMQfR-kb45BUDCoWSk)
See the demo page:
Additional context
The problem occurs in the method
_getDaysInMonth
in the filedate_picker.dart
:Reproducing it for March 2024 it returns
30
:But using
DateTime.utc
returns correctly31
:The text was updated successfully, but these errors were encountered: