-
Notifications
You must be signed in to change notification settings - Fork 860
feat: Add date_slider input widget
#7257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |

📝 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