Hello!
I am trying to get a DatePickerRange component to alter a table. However, I am getting an error when i attempt to do so.
Here is the section of the app.layout code itself.
app.layout = html.Div(
className=“row”,
children=[
html.Div(
dash_table.DataTable(
id=‘table-sorting-filtering’,
columns=[
{‘name’: i, ‘id’: i, ‘deletable’: True} for i in sorted(df.columns)
],
page_current= 0,
page_size= 31,
page_action=‘custom’,
filter_action=‘custom’,
filter_query=‘’,
sort_action=‘custom’,
sort_mode=‘multi’,
sort_by=,
),
style={‘height’: 750, ‘overflowY’: ‘scroll’},
className=‘six columns’
),html.A('Download CSV', id='my-link'), html.Div( dcc.DatePickerRange( id='my-date-picker-range', min_date_allowed=dt(2019, 8, 15), max_date_allowed=dt(2019, 8, 29), initial_visible_month=dt(2019, 8, 15), end_date=dt(2019, 8, 29) ), html.Div(id='output-container-date-picker-range') ), html.Div( id='table-paging-with-graph-container', className="five columns" ), dcc.Interval(id='interval_component', interval = 5000, n_intervals=0) ]
)
here is the error in the Terminal
Traceback (most recent call last):
File “app.py”, line 52, in
html.Div(id=‘output-container-date-picker-range’)
File “C:\Users\TP_baseline\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dash\development\base_component.py”, line 352, in wrapper
return func(*args, **kwargs)
File “C:\Users\TP_baseline\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dash_html_components\Div.py”, line 63, in init
super(Div, self).init(children=children, **args)
File “C:\Users\TP_baseline\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dash\development\base_component.py”, line 122, in init
“Prop {} has value {}\n”.format(k, repr(v))
TypeError: Thedash_html_components.Div
component (version 1.0.2) with the ID “Div(id=‘output-container-date-picker-range’)” detected a Component for a prop other thanchildren
Did you forget to wrap multiplechildren
in an array?
Prop id has value Div(id=‘output-container-date-picker-range’)
Please assist with solving the error. And is this even the right way to structure a datepickerrange to interact with the table?