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

Enable external widgets to set DatePicker state #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hegman12
Copy link

This PR adds 2 methods to controller - getCurrentDate and SetCurrentDate. These allow external widgets to set state of DatePicker. But more proper solution is to implement standard state management.

Description - There are 2 major ways to interact with DatePicker (or any widget).

  1. Allow DatePicker to send out updates when internal state changes. Currently this is done through ondateChnage hook.
  2. Allow DatePicker to update its state when external widgets request it. This PR adds 2 methods getCurrentDate and SetCurrentDate which allow to do that. This is like a easier workaround solution.

@pealthoff
Copy link

I needed the same thing and implemented a similar one but only with the set Date: #47

@hegman12 I don't think that what you did is a workaround, but the correct solution since it's good to have a way for the user to determine how he wants to control the date.

I only think that update the dependencies to nullsafety should be a totally different commit.

@iamvivekkaushik iamvivekkaushik force-pushed the master branch 3 times, most recently from 208d012 to 955a106 Compare June 17, 2023 12:44
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