posit-dev / posit-dev/py-shiny

Add `minview` and `maxview` arguments to date inputs

Open
#776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage
Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Description

First, a big thanks for bringing Shiny to Python! 🎉

This is a feature request to add new arguments to the input_date() and input_date_range() UI components. The minview and maxview arguments would set the minimum and maximum view mode of the datepicker object. From the end-user perspective, they constrain the selectable dates:

  • minview sets the temporal resolution the user can select. Very helpful if you want the end-user to input a month (minview = "months") or year (minview = "years").
  • maxview prevents zooming-out too far, depending on context. This can make UI navigation less error-prone.

Note: I chose the argument names based on the existing startview argument.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the input_date() and input_date_range() entry points and inspect how the existing startview argument reaches the datepicker. Add minview and maxview with the stated month/year selection and zoom limits, then verify both components' datepicker behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.