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

Getting Change Event from MaterialUI Date Picker #1728

Closed
shellac85 opened this issue Apr 30, 2020 · 4 comments
Closed

Getting Change Event from MaterialUI Date Picker #1728

shellac85 opened this issue Apr 30, 2020 · 4 comments

Comments

@shellac85
Copy link

Will there be any way to get both the date as a string and the change event from Materui's Date Picker. Any help appreciated.

I am looking to call this method on the onChange from the DatePicker:

onChangeFrom: (event: React.ChangeEvent<{ name?: string; value: unknown }>) => void;

And this is the code for the DatePicker:

<MuiPickersUtilsProvider utils={MomentUtils}> <DatePicker value={selectedDate} onChange={ (date) => onChangeFrom(date)} } /> </MuiPickersUtilsProvider>

@dmtrKovalenko
Copy link
Member

In v4: You can pass an onChange right to TextField in renderInput (but make sure you are not overriding pickers logic).

For the other types of submission, like button click, enter click or just finishing selection in the last date with autoOk we cannot provide an event, because it will be too generic (duplicate of #473)

@shellac85
Copy link
Author

Thanks. when will v4 be released?

@dmtrKovalenko
Copy link
Member

We are planning stable release in Q4 2020. But we are going to make beta really soon, which should not include anymore breaking changes. So it should be good to update.

@shellac85
Copy link
Author

Ok Thanks. I will check back then.

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

2 participants