Skip to content

Conversation

percula
Copy link
Contributor

@percula percula commented Dec 19, 2022

I've been using this excellent package for awhile, with changes 1 and 2 in production for years with no issues. I figured it's time to commit these changes back to this repo if you'll have them:

  1. The initialValue wasn't being set correctly, so I've added a few lines to set it in the state.
  2. Change default lastDate to be simply 5 days later, rather than 5 years later.
  3. Pass along key to super. I needed this to programmatically clear the date.

@Cali0707 Cali0707 self-requested a review December 20, 2022 16:05
@Cali0707
Copy link
Collaborator

Hi @percula thanks for opening the PR, and I'm sorry I did not get around to reviewing this sooner. Would you be able to provide an example of when the initialValue wasn't being set properly? I haven't been able to recreate this issue myself locally.

@percula
Copy link
Contributor Author

percula commented Feb 3, 2023

Hi @Cali0707 , sorry for my tardiness too! I've created a sample project showing the issue. When the initialvalue is set at widget creation, there isn't an issue. However, if initialvalue is set after widget creation, perhaps by Provider or an async method, it won't display in the TextField. The range will show up just fine in the dialog though.

In the sample project, I've modified the FAB to set the initialValue, to easily replicate the issue:
ezgif com-gif-maker (4)

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

Successfully merging this pull request may close these issues.

2 participants