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

Passing step via timeInputProps has no effect #6247

Closed
1 of 2 tasks
souhagaa opened this issue May 16, 2024 · 3 comments
Closed
1 of 2 tasks

Passing step via timeInputProps has no effect #6247

souhagaa opened this issue May 16, 2024 · 3 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@souhagaa
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.9.1

What package has an issue?

@mantine/dates

What framework do you use?

create-react-app (CRA)

In which browsers you can reproduce the issue?

All

Describe the bug

When trying to pass step prop via timeInputProps to DateTimePicker but it is not working and if I change it manually in the HTML it works.
It seems like Mantine TimeInput component ignores this prop here

a possible solution would be to change that line to step={props.step || withSeconds ? 1 : 60}

If possible, include a link to a codesandbox with a minimal reproduction

https://rb.gy/jmrgpd

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label May 17, 2024
@rtivital
Copy link
Member

Fixed in 7.9.2

@tianhuil
Copy link
Contributor

tianhuil commented Jul 30, 2024

Hi @rtivital: I'm not quite sure how #6204 helps solve the problem. Ideally, we would have

step={props.step || withSeconds ? 1 : 60}

as suggested by @souhagaa . It is not currently done see https://github.com/mantinedev/mantine/blob/master/packages/@mantine/dates/src/components/TimeInput/TimeInput.tsx

I would be happy to implement this and submit a PR

@jannikbuschke
Copy link

Also running into this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

4 participants