I also found this post, similar to your response: https://community.plotly.com/t/improving-handling-of-aborted-callbacks/7536
Here is the resulting snippet of code:
@app.callback(
[Output('my-date-picker-range', 'start_date'), Output('my-date-picker-range', 'end_date')],
[Input('button-update-5', 'n_clicks')])
def update_output(n_clicks):
if n_clicks is None:
raise PreventUpdate
if n_clicks > 0:
start_date = date(2019, 2, 12)
end_date = date.today()
return start_date, end_date
Does this do the same thing as what you mentioned? It appears to be working properly.
My intended functionality is that the data tables will load with the default DataPickerRange dates when the URL is visited, and will only reload with the dates from the Button when it is clicked. It appears to be fine.