Extension to calendar for picking dates
As commented here to bendichter/plotly_activity_chart.py I need options for
- Choosing between horizontal and vertical display,
- In addition to month names on one side I'll need week numbers according to the preferred standard as given e.g. by epiweeks,
- highlighting holidays pulled from different selected holiday calendars (e.g. bank holidays or national holidays for different countries), cf. holidays on PyPI.
But the most important feature for me would be to be able to select dates as if this was a component like a dropdown.
- Currently, it's not a priority for me, though.
- Hoping to come with a little more than a stub asap, anyway.
- Since I can't dive into this project very deep in a short time I'd just like to ask if it even makes sense trying to extend this at all or if you would recommend a new project?
Hey, @schwabts
Thanks for the feedback. I'll prioritize some of these features ASAP, starting with 1 and 3.
As for the dropdown component for filtering dates I'm not so sure it fits in the scope of this project. Have you tried using Dash dropdowns or Streamlit dates filter? Here's an example with my Todoist Analytics dashboard. Code.

Well, "as if this was a component like a dropdown" may not have been a good wording. What I was trying to say was that while I define callbacks for dropdowns e.g. by
@callback(
Output('label', 'children'),
Input('dropdown', 'value'),
)
def update(dropdown_value):
return f'You have selected {value}'
I would like to define them for plotly-calplot by something like
@callback(
Output('label', 'children'),
Input('calplot', 'value'),
)
def update(date_value):
date_string = date.fromisoformat(date_value).strftime('%B %d, %Y')
return f'You have selected the date {date_string}'
Rf. dcc.Dropdown and dcc.DatePickerSingle
I'm also not sure if this project could be the right one to look at given the requirements of my use case. Therefore this issue is kind of a question, too.
The point is I am currently already using a Dash dropdown offering to choose from a long list of single dates. I would be happier with a more compact display showing a long list of weeks each of which would be a row of seven tiles and I simply haven't found any sort of calendar which is more compact.
Last not least, including week numbers could be considered a matter of personal taste but it would be extremely helpful for my use case.