Skip to content

feat(time-input): add clear method and enhance validation behavior fo…#2551

Draft
RamVinayMandal wants to merge 5 commits into
siemens:mainfrom
RamVinayMandal:fix-ix-3322-display-input-as-valid-when-value-is-empty-for-time-input
Draft

feat(time-input): add clear method and enhance validation behavior fo…#2551
RamVinayMandal wants to merge 5 commits into
siemens:mainfrom
RamVinayMandal:fix-ix-3322-display-input-as-valid-when-value-is-empty-for-time-input

Conversation

@RamVinayMandal
Copy link
Copy Markdown
Collaborator

@RamVinayMandal RamVinayMandal commented May 18, 2026

💡 What is the current behavior?

ix-time-input validation is not fully aligned when a value is removed after previous interaction.

  • Optional time inputs are not consistently valid when cleared after being invalid.
  • Required time inputs are not consistently shown as invalid when cleared or emptied.
  • ix-time-input does not provide a public clear() method to clear the value and validation errors.
  • novalidate and dynamic required handling are not fully aligned.

GitHub Issue Number: #

🆕 What is the new behavior?

  • Add a public clear() method to ix-time-input to clear the value and validation errors.
  • Optional invalid time inputs become valid when cleared.
  • Required time inputs become required-invalid when emptied.
  • Align validation behavior for clear/empty handling, novalidate, and dynamic required changes.
  • Add missing component tests for these scenarios.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: e6021f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@siemens/ix Minor
@siemens/ix-aggrid Major
@siemens/ix-angular Minor
@siemens/ix-docs Minor
@siemens/ix-react Minor
@siemens/ix-vue Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a clear() method to the ix-time-input component and aligns its validation logic for required fields, novalidate forms, and dynamic attribute changes. Key feedback includes a suggestion to dynamically remove all validation classes during clear operations to ensure consistency, a request to justify or remove focus logic that might trigger unexpectedly during suppressed validation, and the removal of an unused utility function.

Comment thread packages/core/src/components/input/input.util.ts Outdated
Comment thread packages/core/src/components/time-input/time-input.tsx Outdated
Comment thread packages/core/src/components/utils/input/picker-input.util.ts Outdated
RamVinayMandal and others added 3 commits May 18, 2026 19:56
…ss removal logic

Co-authored-by: Copilot <copilot@github.com>
…for-time-input' of github.com:RamVinayMandal/ix into fix-ix-3322-display-input-as-valid-when-value-is-empty-for-time-input
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant