DatePickerRange and callback in Dash

when I add a DatePicker in Dash I need to do :
@app.callback(Output(‘mygraph’, ‘figure’), [Input('date-picker, ‘value’)]

but how do I do with DatePickerRange as there are start_date and end_date ?
I tried : @app.callback(Output(‘mygraph’, ‘figure’), [Input(‘date-picker-range’, ‘start_date’, ‘end_date’)]
but I get an error …
Idem if I do [Input(‘date-picker-range’, [‘start_date’, ‘end_date’] )]

How can I send the 2 values ? Thank you!

You need to create two Inputs for callback, targeting the ‘start_date’ and ‘end_date’ properties respectively. There are examples in how to do this in the documentation:

1 Like

It works~ Thank you for the solution

1 Like