I am looking for dash component that allows me to create a grid layout with week or month calendar view.
What’s the best way to accomplish something like this?
I’d like a fixed number of grids starting from next day up to 60 days. As suggested in another similar question, I am using dbc.Card, dbc.Row, dbc.Col
to create the grid layout.
def cr(title, id, value, text):
return dbc.Card(
dbc.CardBody(
[
html.H4(title, id="{}-title".format(id),
html.H2(value, id="{}-value.format(value)"),
html.P(text, id="{}-text".format(text)
]
)
)
dbc.Col(
html.Div([
dbc.Row([
dbc.Col(children=[cr(i) for i in range(7)])
]),
dbc.Row([
dbc.Col(children=[cr(i) for i in range(7)])
]),
dbc.Row([
dbc.Col(children=[cr(i) for i in range(7)])
])
])
),
Instead of creating a card for each of the 60 days, I am trying to do this programmatically through a callback. cr
function generates a series of cards
, how I’d like to pass arguments to the card function for it to populate. Example, Title
argument is datetime.today().strftime(’%Y-%m-%d’), i.e the next day