Skip to content

DatePicker: className prop value is ignored in v8.1.0 #7960

@odeta

Description

@odeta

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?

8.1.0

What package has an issue?

@mantine/dates

What framework do you use?

React Router

In which browsers you can reproduce the issue?

Chrome

Describe the bug

When I pass a className value to DatePicker component, the value is ignored when rendering the component.

<DatePicker
  className="test"
  onChange={(newValue) => setValue(new Date(newValue))}
  value={value}
/>

In the case above the className value test is nowhere to be found in the page source and only an empty class attribute is found assigned to the most outer div of DatePicker:

<div class="" data-size="sm" data-calendar="true" type="default">

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

https://codesandbox.io/p/sandbox/mantine-react-template-forked-85x72p

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedCompleted issues that will be published with next patch (1.0.X)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions