plotly / plotly/dash

[BUG] dcc.Input types don't support time and datetime-local

Open
#3,385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

dash                      3.2.0
dash_ag_grid              31.3.1
dash-bootstrap-components 2.0.3
dash_daq                  0.6.0

Describe the bug

When creating a valid dcc.Input like this:

dcc.Input(id=id_, type='time', step=1, value='00:00:00')

I get a warning in Pycharm: Expected type 'Literal["text", "number", "password", "email", "range", "search", "tel", "url", "hidden"] | None', got 'Literal['time']' instead

Expected behavior

There should be no warning.

The same goes for type='datetime-local'.

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.Input component's type declaration and compare its accepted values with the valid time and datetime-local examples in the issue. Update the declaration so both values are accepted without a type-checking warning, then verify the examples with the project's relevant checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.