Skip to content
New issue

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

[BUG] can't select first of month #18

Closed
devii21 opened this issue Dec 17, 2020 · 4 comments
Closed

[BUG] can't select first of month #18

devii21 opened this issue Dec 17, 2020 · 4 comments

Comments

@devii21
Copy link

devii21 commented Dec 17, 2020

This bug was introduced with the newest version (0.3.0). On 0.2.3. it works as expected.

To reproduce:

DatePickerWidget(
              initialDate: DateTime.now(),
              firstDate: DateTime.now(),
              onChange: (value, _) {
                print(value.toString());
              }),
  • select 2021-Jan-01
  • -> onChange value prints 2021-01-02

--

This is a very critical bug so I downgraded to 0.2.3., which introduces the old jumping date bug

Would be highly appreciated if this could be fixed, so i can enjoy the previous bugfix 😊

@kfiross
Copy link
Owner

kfiross commented Jan 5, 2021

Hi! Sorry for the inconvenience.. I will make a fix soon

@bravelocation
Copy link

I think the problem is in line 309 in date_picker_widget.dart

if (index == 0) return;

If you pick the first of the month then the onSelectedChange() event is not called. At first glance, I can't see any reason for this line being there, but doing a quick test locally and commenting the line out fixed the issue for me.

@STG284
Copy link

STG284 commented Mar 5, 2021

Hey @kfiross, did you find a fix?

@kfiross
Copy link
Owner

kfiross commented Mar 18, 2021

@STG284 @devii21 @bravelocation The issue was fixed in version 0.3.4

@kfiross kfiross closed this as completed Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants