You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DatePickerSingle and DatePickerRange are extremely slow when provided a long list of disabled_days.
For example, if one wants to disabled every day between 2010 and 2022, except the first day of each month (4000+ disabled days), then the DatePickerSingle takes about 30 seconds to open and 30 additional seconds each time we change the month. This issue had already been reported here: plotly/dash-core-components#986
Here's a minimal reproducible example:
from dash import Dash, dcc
import pandas as pd
min_date = pd.to_datetime("2010-01-01")
max_date = pd.to_datetime("2022-01-01")
disabled_days = [x for x in pd.date_range(min_date, max_date, freq="D") if x.day != 1]
app = Dash()
app.layout = dcc.DatePickerSingle(
min_date_allowed=min_date,
max_date_allowed=max_date,
disabled_days=disabled_days
)
app.run_server(port=8051)
Expected behavior
The DatePickerSingle should appear and be interactable instantly.
The text was updated successfully, but these errors were encountered:
Bougeant
changed the title
[BUG]
[BUG] DatePickerSingle is extremely slow when using large number of disabled_days
Mar 10, 2022
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
Describe the bug
DatePickerSingle
andDatePickerRange
are extremely slow when provided a long list ofdisabled_days
.For example, if one wants to disabled every day between 2010 and 2022, except the first day of each month (4000+ disabled days), then the
DatePickerSingle
takes about 30 seconds to open and 30 additional seconds each time we change the month. This issue had already been reported here: plotly/dash-core-components#986Here's a minimal reproducible example:
Expected behavior
The
DatePickerSingle
should appear and be interactable instantly.The text was updated successfully, but these errors were encountered: