If you have a dash component that has multiple properties, such as a DatePickerRange:
html.Div([
dcc.DatePickerRange(
id='date-picker-range',
min_date_allowed=min_date,
max_date_allowed=max_date,
start_date=min_date,
end_date=max_date
),...
you can update individual properties, such as end_date via a callback:
@app.callback(
dash.dependencies.Output('date-picker-range', 'end_date'),
[dash.dependencies.Input('refresh-date-btn', 'n_clicks')]
)
def default_datepicker_end(n_clicks):
return max_date
is it possible to update multiple attributes to the single output target, such as in a dict? Perhaps
something like:
@app.callback(
dash.dependencies.Output('date-picker-range', 'setProps'),
[dash.dependencies.Input('refresh-date-btn', 'n_clicks')]
)
def default_datepicker_range(n_clicks):
return {'start_date': start_date, 'end_date': , max_date}