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

DatePicker renamed to DatePickerInput #414

Merged

Conversation

AnnMarieW
Copy link
Collaborator

@AnnMarieW AnnMarieW commented Nov 14, 2024

This PR renames the DatePicker to DatePickerInput so the component name is aligned with the upstream Mantine library.
For more information see #410

Until the real DatePicker component is added, you will see an error message:

image

Here is a sample app to show the error message for the old component name, and that the new component works as expected

from datetime import datetime
import dash_mantine_components as dmc
from dash import Dash, _dash_renderer
_dash_renderer._set_react_version("18.2.0")

app = Dash(external_stylesheets=dmc.styles.ALL)

component = dmc.Stack(
    [
        dmc.DatePicker(
            value=datetime.now().date(),
            label="Date not clearable",
           # w=200,
        ),
        dmc.DatePickerInput(
            value=datetime.now().date(),
            label="Date clearable",
            w=200,
            clearable=True,
        ),
    ]
)


app.layout = dmc.MantineProvider(
    component
)

if __name__ == "__main__":
    app.run(debug=True)
    

@AnnMarieW
Copy link
Collaborator Author

Docs PR here: snehilvj/dmc-docs#106

Copy link

Generated link: snehilvj/dash-mantine-components-414

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Looks good to me!

@AnnMarieW AnnMarieW merged commit 98c68e6 into snehilvj:master Nov 17, 2024
1 check passed
@AnnMarieW AnnMarieW deleted the change-name-DatePicker-to-DatePickerInput branch November 17, 2024 23:24
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