Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a0d331e
feat(core/date-input): add clear method to reset value and validationโ€ฆ
RamVinayMandal May 11, 2026
0c3d0ef
fix(core/date-input): handle empty input as valid and suppress visualโ€ฆ
RamVinayMandal May 11, 2026
638fbfa
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal May 12, 2026
7b267e6
fix(date-input): remove openPicker method from ProxyCmp configuration
RamVinayMandal May 12, 2026
ec038c2
fix(date-input): simplify validation tests and update test descriptions
RamVinayMandal May 12, 2026
c33e012
fix(date-input): improve date validation logic to handle empty min/maโ€ฆ
RamVinayMandal May 12, 2026
2aab4fc
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal May 12, 2026
7db8833
Merge branch 'siemens:main' into fix-ix-3322-display-input-as-valid-wโ€ฆ
RamVinayMandal May 18, 2026
6d5f7d6
feat(date-input): enhance validation handling and error messaging
RamVinayMandal Jun 3, 2026
8aefbc5
refactor(date-input): reorganize regression tests for clarity and conโ€ฆ
RamVinayMandal Jun 5, 2026
4b6365f
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 5, 2026
5bead97
feat: add 'i18nErrorRequired' prop to IxDateInput component
RamVinayMandal Jun 5, 2026
7094dc0
Fixed sonarqube issues
RamVinayMandal Jun 5, 2026
39f4891
fixed - nested function more than 4 levels deep.
RamVinayMandal Jun 5, 2026
aae5c05
fix(date-input): update validation handling for empty date input and โ€ฆ
RamVinayMandal Jun 8, 2026
d071060
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 8, 2026
ad34c1a
fix(date-input): format mount calls for improved readability in accesโ€ฆ
RamVinayMandal Jun 8, 2026
3f5cbe0
Refactor code structure for improved readability and maintainability
RamVinayMandal Jun 8, 2026
322a6a0
fix(date-input): update error messages for empty date field and improโ€ฆ
RamVinayMandal Jun 9, 2026
bb12d7f
fix(date-input): improve validation for empty date input and enhance โ€ฆ
RamVinayMandal Jun 9, 2026
c84833f
fix(date-input): enhance validation logic for empty date input and adโ€ฆ
RamVinayMandal Jun 9, 2026
33c5e56
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 9, 2026
800d489
fix(date-input): ensure form validity sync on required field change
RamVinayMandal Jun 10, 2026
d559e4e
fix(date-input): add keyboard navigation test for opening date pickerโ€ฆ
RamVinayMandal Jun 10, 2026
001a770
fix(date-input): enhance validation logic and add clear/reportValiditโ€ฆ
RamVinayMandal Jun 10, 2026
e1a2a92
fix(date-input): refactor handlePickerFocusoutCallback to use standarโ€ฆ
RamVinayMandal Jun 10, 2026
6ea2c13
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 11, 2026
6d83c6c
fix(date-input): Updated changeset file content
RamVinayMandal Jun 11, 2026
e626b83
fix(date-input): update validation logic to handle empty date values โ€ฆ
RamVinayMandal Jun 11, 2026
5888100
fix(date-input): remove unnecessary parameter from acceptValidAfterReโ€ฆ
RamVinayMandal Jun 11, 2026
387eead
fix(date-input): refactor handlePickerFocusoutCallback to use arrow fโ€ฆ
RamVinayMandal Jun 11, 2026
500e30d
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 11, 2026
ce00c93
fix(date-input): mark handlePickerFocusoutCallback as readonly
RamVinayMandal Jun 11, 2026
09ad34a
fix(date-input): format handlePickerFocusoutCallback for improved reaโ€ฆ
RamVinayMandal Jun 11, 2026
7211df1
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 22, 2026
1f263e7
fix(date-input): remove unnecessary validation on calendar interactioโ€ฆ
RamVinayMandal Jun 22, 2026
086f9f5
fix(date-input): update validation behavior for calendar date selectiโ€ฆ
RamVinayMandal Jun 22, 2026
52c8dbc
fix(number-input): update assertions to use toBeCloseTo for floating โ€ฆ
RamVinayMandal Jun 22, 2026
3b80918
fix(date-input): prevent form submission when required field is emptyโ€ฆ
RamVinayMandal Jun 22, 2026
e531f5d
fix(date-input): improve validation handling for empty date values anโ€ฆ
RamVinayMandal Jun 23, 2026
27c4cc8
fix(date-input): simplify invalidReason assignment for date validatioโ€ฆ
RamVinayMandal Jun 23, 2026
b4f5174
fix(date-input): remove unused keyboard focus test and clean up code
RamVinayMandal Jun 24, 2026
f5902bc
fix(date-input): remove picker auto-open behavior when navigating viaโ€ฆ
RamVinayMandal Jun 24, 2026
4b8745a
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 24, 2026
4d03404
Added fix for novalidate + invalid + reportValidaity + blur behavior.โ€ฆ
RamVinayMandal Jun 30, 2026
602efd1
Merge branch 'fix-ix-3322-display-input-as-valid-when-value-is-empty-โ€ฆ
RamVinayMandal Jun 30, 2026
1c36671
Merge branch 'main' into fix-ix-3322-display-input-as-valid-when-valuโ€ฆ
RamVinayMandal Jun 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/feat-date-input-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@siemens/ix': minor
---

Added `clear()` method to reset value and validation state, removing all visual error indicators even after the field has been touched.

Added `reportValidity()` method to programmatically trigger validation and show visual error state immediately.

Added `i18nErrorRequired` prop (`i18n-error-required`) to customize the required-field error message.

Fixed validation behavior for `ix-date-input`:

- Non-required field is now valid when the value is removed (keyboard deletion or programmatic empty string).
- Required field shows required-missing error only when empty and touched, or after `reportValidity()`.
- Visual validation errors only appear after first blur; programmatic value changes are validated internally without visual feedback until interaction.
- `novalidate` forms suppress all visual validation while `reportValidity()` overrides this suppression.
- Dynamically toggling the `required` attribute immediately reflects correct validation state.
- Clicking and holding calendar dates does not trigger validation errors on required empty fields; removed momentary red-border flash when selecting a calendar date.
- Form submission is now prevented when the field is invalid or required but empty; submission proceeds only when the field is valid (form-associated component with ElementInternals validation).

6 changes: 3 additions & 3 deletions packages/angular/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,15 @@ The event payload contains information about the selected date range.


@ProxyCmp({
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
methods: ['getNativeInputElement', 'focusInput']
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'i18nErrorRequired', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
methods: ['clear', 'getNativeInputElement', 'focusInput', 'reportValidity']
})
@Component({
selector: 'ix-date-input',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'i18nErrorRequired', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
outputs: ['valueChange', 'validityStateChange', 'ixChange'],
standalone: false
})
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/standalone/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,15 +735,15 @@ The event payload contains information about the selected date range.

@ProxyCmp({
defineCustomElementFn: defineIxDateInput,
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
methods: ['getNativeInputElement', 'focusInput']
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'i18nErrorRequired', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
methods: ['clear', 'getNativeInputElement', 'focusInput', 'reportValidity']
})
@Component({
selector: 'ix-date-input',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
inputs: ['ariaLabelCalendarButton', 'ariaLabelNextMonthButton', 'ariaLabelPreviousMonthButton', 'disabled', 'enableTopLayer', 'format', 'helperText', 'i18nErrorDateUnparsable', 'i18nErrorRequired', 'infoText', 'invalidText', 'label', 'locale', 'maxDate', 'minDate', 'name', 'placeholder', 'readonly', 'required', 'showTextAsTooltip', 'showWeekNumbers', 'suppressSubmitOnEnter', 'textAlignment', 'validText', 'value', 'warningText', 'weekStartIndex'],
outputs: ['valueChange', 'validityStateChange', 'ixChange'],
})
export class IxDateInput {
Expand Down
24 changes: 24 additions & 0 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,11 @@ export namespace Components {
* @default 'Previous month'
*/
"ariaLabelPreviousMonthButton"?: string;
/**
* Clears the input value and resets the touched state. Unlike clearing the value directly, this method restores the initial, non-invalid state and removes visible validation errors.
* @since 5.2.0
*/
"clear": () => Promise<void>;
/**
* Disabled attribute.
* @default false
Expand Down Expand Up @@ -1006,6 +1011,12 @@ export namespace Components {
* @default 'Date is not valid'
*/
"i18nErrorDateUnparsable": string;
/**
* I18n string for the error message when the date field is empty.
* @since 5.2.0
* @default 'Date is required'
*/
"i18nErrorRequired": string;
/**
* Info text below the input field.
*/
Expand Down Expand Up @@ -1050,6 +1061,12 @@ export namespace Components {
* @default false
*/
"readonly": boolean;
/**
* Trigger validation and show visual error state immediately, independently of user interaction โ€” for example, in AJAX submissions or manual validation. Not suppressed by `<form novalidate>` โ€” errors surface regardless.
* @returns `true` if valid, `false` otherwise.
* @since 5.2.0
*/
"reportValidity": () => Promise<boolean>;
/**
* Required attribute.
*/
Expand Down Expand Up @@ -7576,6 +7593,12 @@ declare namespace LocalJSX {
* @default 'Date is not valid'
*/
"i18nErrorDateUnparsable"?: string;
/**
* I18n string for the error message when the date field is empty.
* @since 5.2.0
* @default 'Date is required'
*/
"i18nErrorRequired"?: string;
/**
* Info text below the input field.
*/
Expand Down Expand Up @@ -11725,6 +11748,7 @@ declare namespace LocalJSX {
"validText": string;
"showTextAsTooltip": boolean;
"i18nErrorDateUnparsable": string;
"i18nErrorRequired": string;
"showWeekNumbers": boolean;
"weekStartIndex": number;
"ariaLabelPreviousMonthButton": string;
Expand Down
Loading
Loading