Datepicker: Cannot be cleared (due to internal state conditional)

Open
#1,868 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start by reproducing the three clearing attempts from the linked gist and then trace the datepicker's internal state handling. Done means at least one of the reported ways clears the input without recreating it; the issue does not name a source file or test to run.

Written by the indexing model from the issue text.

Description

date-picker

The following example shows three different attempts to clear an input a datepicker. All failed. I have a workaround but it seems to me that it should be coded such that at least one of them works to clear input.

https://gist.github.com/prescod/724c19066b8aa206a6d210c15b077596

My workaround is to change the key and therefore clear the input by re-creating it.

Dominant language
JavaScript
Stars
982
Forks
440
Avg merge
1d 21h
Merged PRs (30d)
4

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.

More from salesforce/design-system-react

All issues in salesforce/design-system-react

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.