Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Addresses feedback from #5440 to demonstrate empty string reset for date inputs across all framework showcases.

Changes

React showcase (showcases/react-showcase/src/components/form/index.tsx):

  • Added value={dateinput} prop to date input (line 121) - converts from uncontrolled to controlled component
  • Added setDateinput('') to reset button handler (line 258)

Vue showcase - already implements date input reset at line 60

// Before: uncontrolled date input
<DBInput
  type="date"
  onChange={(event) => setDateinput(event.target.value)}
/>

// After: controlled date input with reset capability
<DBInput
  type="date"
  value={dateinput}
  onChange={(event) => setDateinput(event.target.value)}
/>

// Reset button now clears both text and date inputs
<DBButton onClick={() => {
  setInput('reset');
  setDateinput('');  // ← added
}}>

Aligns React showcase with Angular showcase pattern where form.get('dateinput')?.setValue('') resets date fields.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2025

⚠️ No Changeset found

Latest commit: 11da0be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Address feedback on empty string reset for date form fields feat: add date input reset to React showcase Nov 21, 2025
Copilot AI requested a review from mfranzke November 21, 2025 11:03
Copilot finished work on behalf of mfranzke November 21, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants