plotly / plotly/dash

rename the dcc.DatePickerSingle `date` property to `value`

Open
#1,862 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Is your feature request related to a problem? Please describe.
Pattern-matching callbacks are really helpful when collecting a large number of inputs in a callback, using the value component property. For example, using the following as callback inputs works really well:

Input({"type": "param", "index": ALL}, "id"),
Input({"type": "param", "index": ALL}, "value"),

But, this is complicated when a date from dcc.DatePickerSingle is a parameter, because the name of the property holding its 'value' is actually called date. It's workable to just pass something like Input("start-date", "date") as a separate callback input, but makes for messy code and to some extent defeats the elegance of pattern-matching.

Describe the solution you'd like
The component property from dcc.DatePickerSingle is called value instead of date.

Describe alternatives you've considered
The workaround mentioned above is the alternative I've implemented. You could also have a dcc.Input where the user types in a date, but then you'd lose the nice calendar UI element.

Contributor guide

Open the contributing guide

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 dcc.DatePickerSingle component entry point and trace where its date property is defined and exposed to callbacks. Check the related component and callback tests before assessing the compatibility impact; done means the property is consistently available as value without leaving the requested behavior ambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, react
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.