Date-picker-range dynamical updates

Hello mates,
I face following challenge: I’ve a simple dash app. The inputs are tables from a mySQL db.
I’d like to update the date-picker inputs dynamically as the time period in the tables differs.
I also hope to understand the logic more in deep.

I’ve created the date picker range object with default values and also created this call back which does not seem to work:
@app.callback(Output(‘date-picker-range’, ‘start_date’),
[Input(‘tic_dropdown’, ‘value’)])

def update_daterange_start(tic_dropdown_value):
asset_tic = get_data(tic_dropdown_value)
start_date = asset_tic[‘date’].min().to_pydatetime().strftime(’%Y, %m, %d’)

Just a short sum:
the input is the identification of the a DF.
asset_tic calls defined function to retrieve the appropriate table.
This expression “asset_tic[‘date’].min().to_pydatetime().strftime(’%Y, %m, %d’)” gets the date in format (2016, 2,3)…

The value is not updated…
Many thanks,

The bug found: I forgot the return start_date. :-))

1 Like