Updated for Mantine 8.3.0#655
Merged
AnnMarieW merged 5 commits intosnehilvj:masterfrom Sep 20, 2025
Merged
Conversation
Collaborator
Author
import dash_mantine_components as dmc
from dash import Dash, Input, Output, callback
app = Dash()
component = dmc.Stack([
dmc.MiniCalendar(
defaultDate="2025-01-02",
value="2025-01-03",
id="mini-calendar"
),
dmc.Text(id="mini-calendar-date", m="md")
])
app.layout = dmc.MantineProvider(
component
)
@callback(
Output("mini-calendar-date", "children"),
Input("mini-calendar", "value"),
)
def update(d):
return f"You selected: {d}"
if __name__ == "__main__":
app.run(debug=True)import dash_mantine_components as dmc
from dash import Dash
scripts = [
"https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.8/dayjs.min.js", # dayjs
"https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.8/locale/fr.min.js", # french locale
]
app = Dash(external_scripts=scripts)
component1 = dmc.MiniCalendar(numberOfDays=10)
component2 = dmc.MiniCalendar(
numberOfDays=6,
defaultDate="2025-04-13",
minDate = "2025-04-14",
maxDate = "2025-04-24",
)
component3 = dmc.MiniCalendar(
numberOfDays=8,
getDayProps={"function":"weekendRed"}
)
component4 = dmc.DatesProvider(
dmc.MiniCalendar(locale="fr", defaultDate="2025-04-01"),
settings={"locale": "fr"}
)
component5 = dmc.MiniCalendar(locale="fr", defaultDate="2025-04-01")
app.layout = dmc.MantineProvider([
dmc.Text("Number of days = 10", mt="lg"),
component1,
dmc.Text("Min and Max dates", mt="lg"),
component2,
dmc.Text("Format days with getDayProp function", mt="lg"),
component3,
dmc.Text("Locale French", mt="lg"),
component4,
])
if __name__ == "__main__":
app.run(debug=True)
"""
var dmcfuncs = window.dashMantineFunctions = window.dashMantineFunctions || {};
var dayjs = window.dayjs;
dmcfuncs.weekendRed = function (dateStr) {
const d = dayjs(dateStr);
if ([0, 6].includes(d.day())) {
return {
style: {
color: 'var(--mantine-color-red-8)',
},
};
}
return {};
};
"""
|
Collaborator
Author
Collaborator
Author
|
1a38653 to
84a8e0d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Updates for new features introduced in Mantine 8.3.0
orientation="vertical"toProgressclearSearchOnChangeprop toMultiSelectreverseTimeControlsListtoTimePickerTipTap3 support (separate PR)