mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.83k stars 1.9k forks source link

Where is controlled TimeInput gone? #4232

Closed atumas-bananamilk closed 1 year ago

atumas-bananamilk commented 1 year ago

What package has an issue

@mantine/core

Describe the bug

Just upgraded to 6.0 from 5.10, which took hours to update due to tons of changes, I see there's no way to control TimeInput anymore?

How can we control it now? We need it for our app..

Screenshot 2023-05-12 at 08 56 16

Before:

Screenshot 2023-05-12 at 08 59 48

After upgrading:

Screenshot 2023-05-12 at 08 59 19

What version of @mantine/hooks page do you have in package.json?

6.0.0

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

None

Are you willing to participate in fixing this issue and create a pull request with the fix

None

Possible fix

No response

rtivital commented 1 year ago

Please use Issues to report bugs, for questions use Discussions. TimeInput in 6.0 is regular input[type="time"] you can control its value the same way as you would regular input element.

atumas-bananamilk commented 1 year ago

How? All Mantine wrappers for these expose a value & onChange. We obviously want to avoid vanilla JS. https://mantine.dev/hooks/use-input-state

rtivital commented 1 year ago

https://codesandbox.io/s/brave-paper-w1lizo?file=/src/App.tsx

atumas-bananamilk commented 1 year ago

@rtivital what about format="12" being gone? Our users use different meridiems.

rtivital commented 1 year ago

input[type="time"] automatically changes format based on user language

atumas-bananamilk commented 1 year ago

"User language"? It means it's related to the browser? What if we have a setting in our application to change between 12 / 24? It's not related to the browser then.

Is it still possible to force the format without relying on "user language"?