Datepicker: Allow controlled clearing of input

Open
#2,965 1 comment 5 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #3169 by @ekim088 — closed without merging

Assessment

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

Research direction

Start at the Datepicker component and its input value-handling path; inspect how the initial uncontrolled value and later controlled updates are handled. Done means a controlled Datepicker can be reset to an empty string with value={null}, with coverage for the reset behavior.

Written by the indexing model from the issue text.

Description

date-picker stale

Currently, on initial load the input is uncontrolled and creates a clear empty string value. There currently is not a way to reset to an empty string once the value is set.

One proposal is to allow a controlled component reset to input empty string by using value={null}.

Dominant language
JavaScript
Stars
994
Forks
444
Avg merge
3d 23h
Merged PRs (30d)
44

Getting set up

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.