feat: Add date_slider input widget#7257
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The automatic labeling to "documentation" seems off 🫠 |
|
@akshayka @dmadisetti - curious if you think |
|
@mscolnick for context this is a date range slider (I guess I could rename it), meaning start to end. Screenshot:
|
|
I think if they are separate sliders, then it would be good rename to include (I'm leaning towards merging them if it's possible and the api does not get overloaded with different params when a int vs date) |
|
Neat PR! I am leaning toward adding two new APIs:
These are the reasons I prefer adding new APIs:
That said ... maybe the type concern could be addressed with generics and (If we did use a single API, then I'd suggest we make the change across |
@FBruzzesi Can you describe your use case for custom ordered sequences? I am wondering if we just design for that solution instead of special casing dates |
Hey @akshayka 👋🏼 First of all thanks for the patience in this PR, I am really tight these days. And thanks for considering a broader request. Here a use case I have goes as follows. I would like to create a range slider with a sequence that has a natural order. Specifically I would want to have a sequence of isoweeks. I build a library iso-week-date to simplify a bunch of operations in python (such as addition, subtraction and comparison), but in general notice that the iso weeks have a natural lexicographical order, e.g. "2025-W01" < "2025-W02"). If I were able to put these values into a slider, I can use such to filter a dataframe by some column (e.g. |
|
Bumping this. The screenshot looks great ! 2 additions I would find useful:
To be complete, Panel has a nice https://panel.holoviz.org/reference/widgets/DateRangeSlider.html and it works as-is in marimo but renders badly especially in dark mode: |

📝 Summary
This is a proof of concept (maybe headstart?) to introduce a
date_slider(edit: actually adate_range_slider) widget.Fixes #6316
🔍 Description of Changes
date_sliderui widgetdates.pymoduleScreenshot of rendering
📋 Checklist