Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
06a9d3d
Added fix for input behavior related points mentioned in story
RamVinayMandal Oct 30, 2025
8c16cf8
Validation handling improved with reset functionality and specificallโ€ฆ
RamVinayMandal Nov 2, 2025
d15df91
Added main fix
1307-Dev Nov 3, 2025
e589ea8
Finalized date input fixes
RamVinayMandal Nov 6, 2025
16ba13a
Optimized syncValidationClasses method
RamVinayMandal Nov 6, 2025
880fc16
Form validations with respect to all cases of noValidate handled for โ€ฆ
khathija-ahamadi Nov 7, 2025
63494ee
Test cases added for date input
RamVinayMandal Nov 8, 2025
0a009af
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
1307-Dev Nov 11, 2025
2cbd50e
Time input reset functionality added with common method
RamVinayMandal Nov 12, 2025
6660eea
Fixed merged conflicts. Replaced core/radio.tsx and core/radio-group.โ€ฆ
RamVinayMandal Nov 12, 2025
5346434
Added changes for input, number input and textarea
1307-Dev Nov 12, 2025
675404b
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
1307-Dev Nov 12, 2025
b126d83
Added novalidate functionality for time input
RamVinayMandal Nov 12, 2025
c84b444
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 12, 2025
cc5e663
Added fix for input behavior related points for select and fix for Coโ€ฆ
varun-srinivasa Nov 13, 2025
c3bc346
Created common method for syncValidationClasses which is used for maiโ€ฆ
RamVinayMandal Nov 13, 2025
723b084
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 13, 2025
93aed70
Added time input test cases
RamVinayMandal Nov 13, 2025
f9756cf
Optimized the date and time input code to remove duplication
RamVinayMandal Nov 13, 2025
9612b9c
Reduced code duplication for date and time input
RamVinayMandal Nov 14, 2025
efc855f
Reverted change.
khathija-ahamadi Nov 14, 2025
66e428c
Added common code for date and time input
RamVinayMandal Nov 14, 2025
ddd7e37
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 14, 2025
9d9f33b
Merge branch 'main' into dev-ix-2595-display-input-as-valid-when-the-โ€ฆ
1307-Dev Nov 17, 2025
7be3c91
reduced replicated code
RamVinayMandal Nov 17, 2025
671ed60
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 17, 2025
fa8ac3f
Fix some error
1307-Dev Nov 17, 2025
7ce2ba9
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 17, 2025
2c79548
Moved common methods into common file for date and time input
RamVinayMandal Nov 17, 2025
d988530
Link fix
1307-Dev Nov 17, 2025
3ce06c5
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
1307-Dev Nov 17, 2025
6bfaa3d
Fixed lint error
RamVinayMandal Nov 17, 2025
89fe0fe
Created common methods for duplicate codes
RamVinayMandal Nov 17, 2025
c23c4c9
Lint issues fixed
RamVinayMandal Nov 17, 2025
e28afa8
Modified reset method and reverted some changes
1307-Dev Nov 18, 2025
e86bc43
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
1307-Dev Nov 18, 2025
8a273a2
Fixed lint errors and added tests
1307-Dev Nov 18, 2025
f936681
Merge branch 'dev-ix-2595-display-input-as-valid-when-the-value-is-emโ€ฆ
RamVinayMandal Nov 30, 2025
02b47bb
Replaced reset method with clear method
RamVinayMandal Dec 2, 2025
f0878c6
Merged changed from main and resolved conflicts
RamVinayMandal Dec 2, 2025
b18af33
Fixed touched state update issue for time input
RamVinayMandal Dec 3, 2025
34e6702
Merge branch 'siemens:main' into dev-ix-2595-display-input-as-valid-wโ€ฆ
RamVinayMandal Dec 3, 2025
21740a7
Resolved sonarcube errors
RamVinayMandal Dec 3, 2025
f1f358d
Testing examples file for Date and Time inputs (Angular testing exampโ€ฆ
RamVinayMandal Dec 3, 2025
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ packages/documentation/static/ionic-preview
# artifact from bundle @siemens/ix-icons
###
ix-icons/dist/collection/components/icon/icon.css

# SonarQube
.scannerwork/
sonar-project.properties
5 changes: 5 additions & 0 deletions packages/angular-standalone-test-app/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,11 @@ export const routes: Routes = [
loadComponent: () =>
import('../preview-examples/tile').then((m) => m.default),
},
{
path: 'time-input-form-test',
loadComponent: () =>
import('../preview-examples/time-input-form-test').then((m) => m.default),
},
{
path: 'timepicker',
loadComponent: () =>
Expand Down

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions packages/angular-test-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import DateInputLabel from '../preview-examples/date-input-label';
import DateInputReadonly from '../preview-examples/date-input-readonly';
import DateInputValidation from '../preview-examples/date-input-validation';
import DateInputWithSlots from '../preview-examples/date-input-with-slots';
import DateInputFormTest from '../preview-examples/date-input-form-test';
import Datepicker from '../preview-examples/datepicker';
import DatepickerLocale from '../preview-examples/datepicker-locale';
import DatepickerRange from '../preview-examples/datepicker-range';
Expand Down Expand Up @@ -210,6 +211,13 @@ import TextareaRowsCols from '../preview-examples/textarea-rows-cols';
import TextareaValidation from '../preview-examples/textarea-validation';
import ThemeService from '../preview-examples/theme-switcher';
import Tile from '../preview-examples/tile';
import TimeInput from '../preview-examples/time-input';
import TimeInputDisabled from '../preview-examples/time-input-disabled';
import TimeInputFormTest from '../preview-examples/time-input-form-test';
import TimeInputLabel from '../preview-examples/time-input-label';
import TimeInputReadonly from '../preview-examples/time-input-readonly';
import TimeInputValidation from '../preview-examples/time-input-validation';
import TimeInputWithSlots from '../preview-examples/time-input-with-slots';
import Timepicker from '../preview-examples/timepicker';
import Toast from '../preview-examples/toast';
import ToastCustom from '../preview-examples/toast-custom';
Expand Down Expand Up @@ -454,6 +462,10 @@ const routes: Routes = [
path: 'date-input-with-slots',
component: DateInputWithSlots,
},
{
path: 'date-input-form-test',
component: DateInputFormTest,
},
{
path: 'datepicker',
component: Datepicker,
Expand Down Expand Up @@ -797,6 +809,13 @@ const routes: Routes = [
{ path: 'input-with-slots', component: InputWithSlots },
{ path: 'theme-switcher', component: ThemeService },
{ path: 'tile', component: Tile },
{ path: 'time-input', component: TimeInput },
{ path: 'time-input-disabled', component: TimeInputDisabled },
{ path: 'time-input-form-test', component: TimeInputFormTest },
{ path: 'time-input-label', component: TimeInputLabel },
{ path: 'time-input-readonly', component: TimeInputReadonly },
{ path: 'time-input-validation', component: TimeInputValidation },
{ path: 'time-input-with-slots', component: TimeInputWithSlots },
{ path: 'timepicker', component: Timepicker },
{ path: 'toggle-button-primary', component: ToggleButtonPrimary },
{ path: 'toggle-button-secondary', component: ToggleButtonSecondary },
Expand Down Expand Up @@ -881,6 +900,13 @@ const routes: Routes = [
path: 'tile',
component: Tile,
},
{ path: 'time-input', component: TimeInput },
{ path: 'time-input-disabled', component: TimeInputDisabled },
{ path: 'time-input-form-test', component: TimeInputFormTest },
{ path: 'time-input-label', component: TimeInputLabel },
{ path: 'time-input-readonly', component: TimeInputReadonly },
{ path: 'time-input-validation', component: TimeInputValidation },
{ path: 'time-input-with-slots', component: TimeInputWithSlots },
{
path: 'timepicker',
component: Timepicker,
Expand Down
16 changes: 16 additions & 0 deletions packages/angular-test-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import DateInputLabel from '../preview-examples/date-input-label';
import DateInputReadonly from '../preview-examples/date-input-readonly';
import DateInputValidation from '../preview-examples/date-input-validation';
import DateInputWithSlots from '../preview-examples/date-input-with-slots';
import DateInputFormTest from '../preview-examples/date-input-form-test';
import Datepicker from '../preview-examples/datepicker';
import DatepickerLocale from '../preview-examples/datepicker-locale';
import DatepickerRange from '../preview-examples/datepicker-range';
Expand Down Expand Up @@ -218,6 +219,13 @@ import TextareaRowsCols from '../preview-examples/textarea-rows-cols';
import TextareaValidation from '../preview-examples/textarea-validation';
import ThemeSwitcher from '../preview-examples/theme-switcher';
import Tile from '../preview-examples/tile';
import TimeInput from '../preview-examples/time-input';
import TimeInputDisabled from '../preview-examples/time-input-disabled';
import TimeInputFormTest from '../preview-examples/time-input-form-test';
import TimeInputLabel from '../preview-examples/time-input-label';
import TimeInputReadonly from '../preview-examples/time-input-readonly';
import TimeInputValidation from '../preview-examples/time-input-validation';
import TimeInputWithSlots from '../preview-examples/time-input-with-slots';
import Timepicker from '../preview-examples/timepicker';
import Toast from '../preview-examples/toast';
import ToastCustom from '../preview-examples/toast-custom';
Expand Down Expand Up @@ -299,6 +307,7 @@ import WorkflowVertical from '../preview-examples/workflow-vertical';
DateInputReadonly,
DateInputValidation,
DateInputWithSlots,
DateInputFormTest,
ContentExample,
ContentHeader,
ContentHeaderNoBack,
Expand Down Expand Up @@ -433,6 +442,13 @@ import WorkflowVertical from '../preview-examples/workflow-vertical';
TextareaLegacy,
ThemeSwitcher,
Tile,
TimeInput,
TimeInputDisabled,
TimeInputFormTest,
TimeInputLabel,
TimeInputReadonly,
TimeInputValidation,
TimeInputWithSlots,
Timepicker,
ToastCustom,
ToastPosition,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
<!--
SPDX-FileCopyrightText: 2025 Siemens AG

SPDX-License-Identifier: MIT

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<div style="padding: 1rem; font-size: 0.9rem">
<h2 style="margin-bottom: 0.5rem">Date Input Validation Tests</h2>
<div style="margin-bottom: 1rem; padding: 0.75rem; border-radius: 4px">
<strong>Testing:</strong> Required field validation (red border) after blur. Format: YYYY-MM-DD
</div>

<button
(click)="clearLogs()"
style="padding: 0.5rem 1rem; margin-bottom: 1rem; border: none; border-radius: 4px; cursor: pointer; color: #333">
Clear Logs
</button>

<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem">

<!-- Scenario 1: Required (Standalone) -->
<div style="border: 2px solid #c62828; border-radius: 8px; padding: 1rem;">
<h4 style="margin: 0 0 0.5rem 0; color: #c62828">1๏ธโƒฃ Required (Standalone)</h4>
<ix-date-input
#requiredInput
name="req1"
label="Required Date"
[required]="true"
(valueChange)="onValueChange($event, '1๏ธโƒฃ')"
(focus)="onFocus('1๏ธโƒฃ')"
(blur)="onBlur('1๏ธโƒฃ')"
></ix-date-input>
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap">
<button
type="button"
(click)="setEmpty(requiredInput, '1๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #607d8b; color: white">
Empty
</button>
<button
type="button"
(click)="setValid(requiredInput, '1๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #4caf50; color: white">

Check warning on line 46 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmmu&open=AZrjpm6Ga76ImZeKBmmu&pullRequest=2255
Valid (Christmas)
</button>
<button
type="button"
(click)="setInvalid(requiredInput, '1๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #f44336; color: white">

Check warning on line 52 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmmv&open=AZrjpm6Ga76ImZeKBmmv&pullRequest=2255
Invalid
</button>
<button
type="button"
(click)="triggerManualBlur(requiredInput, '1๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #ff5722; color: white">
Manual Blur
</button>
<button
type="button"
(click)="clearInput(requiredInput, '1๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #9c27b0; color: white">
Clear()
</button>
</div>
</div>

<!-- Scenario 2: Optional (Standalone) -->
<div style="border: 2px solid #1976d2; border-radius: 8px; padding: 1rem;">
<h4 style="margin: 0 0 0.5rem 0; color: #1976d2">2๏ธโƒฃ Optional (Standalone)</h4>
<ix-date-input
#optionalInput
name="opt1"
label="Optional Date"
[required]="false"
(valueChange)="onValueChange($event, '2๏ธโƒฃ')"
(focus)="onFocus('2๏ธโƒฃ')"
(blur)="onBlur('2๏ธโƒฃ')"
></ix-date-input>
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap">
<button
type="button"
(click)="setEmpty(optionalInput, '2๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #607d8b; color: white">
Empty
</button>
<button
type="button"
(click)="setValid(optionalInput, '2๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #4caf50; color: white">
Valid (Christmas)
</button>
<button
type="button"
(click)="setInvalid(optionalInput, '2๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #f44336; color: white">

Check warning on line 98 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmmz&open=AZrjpm6Ga76ImZeKBmmz&pullRequest=2255
Invalid
</button>
<button
type="button"
(click)="triggerManualBlur(optionalInput, '2๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #ff5722; color: white">

Check warning on line 104 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmm0&open=AZrjpm6Ga76ImZeKBmm0&pullRequest=2255
Manual Blur
</button>
<button
type="button"
(click)="clearInput(optionalInput, '2๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #9c27b0; color: white">
Clear()
</button>
</div>
</div>

<!-- Scenario 3: Form Context (Required) -->
<div style="border: 2px solid #388e3c; border-radius: 8px; padding: 1rem;">
<h4 style="margin: 0 0 0.5rem 0; color: #388e3c">3๏ธโƒฃ Form Required</h4>
<form [formGroup]="testForm" (ngSubmit)="onFormSubmit($event, '3๏ธโƒฃ')" novalidate>
<ix-date-input
#formRequiredInput
name="form_req"
label="Form Required Date"
formControlName="requiredDate"
(valueChange)="onValueChange($event, '3๏ธโƒฃ')"
(focus)="onFocus('3๏ธโƒฃ')"
(blur)="onBlur('3๏ธโƒฃ')"
></ix-date-input>
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap">
<button
type="button"
(click)="setEmpty(formRequiredInput, '3๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #607d8b; color: white">

Check warning on line 133 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmm1&open=AZrjpm6Ga76ImZeKBmm1&pullRequest=2255
Empty
</button>
<button
type="button"
(click)="setValid(formRequiredInput, '3๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #4caf50; color: white">
Valid (Christmas)
</button>
<button
type="button"
(click)="setInvalid(formRequiredInput, '3๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #f44336; color: white">

Check warning on line 145 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmm3&open=AZrjpm6Ga76ImZeKBmm3&pullRequest=2255
Invalid
</button>
<button
type="button"
(click)="triggerManualBlur(formRequiredInput, '3๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #ff5722; color: white">

Check warning on line 151 in packages/angular-test-app/src/preview-examples/date-input-form-test.html

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=siemens_ix&issues=AZrjpm6Ga76ImZeKBmm4&open=AZrjpm6Ga76ImZeKBmm4&pullRequest=2255
Manual Blur
</button>
<button
type="button"
(click)="clearInput(formRequiredInput, '3๏ธโƒฃ')"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #9c27b0; color: white">
Clear()
</button>
<button
type="submit"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #795548; color: white">
Submit
</button>
</div>
</form>
</div>
</div>

<!-- Date Range Example -->
<div style="border: 2px solid #673ab7; border-radius: 8px; padding: 1rem; margin-bottom: 1rem">
<h4 style="margin: 0 0 0.5rem 0; color: #673ab7">4๏ธโƒฃ Date Range</h4>
<div style="display: flex; gap: 1rem; align-items: end; flex-wrap: wrap">
<div style="flex: 1; min-width: 200px">
<ix-date-input
#rangeStartInput
name="range_start"
label="Start Date"
(valueChange)="onValueChange($event, '4๏ธโƒฃ Start')"
(focus)="onFocus('4๏ธโƒฃ Start')"
(blur)="onBlur('4๏ธโƒฃ Start')"
></ix-date-input>
</div>
<div style="flex: 1; min-width: 200px">
<ix-date-input
#rangeEndInput
name="range_end"
label="End Date"
(valueChange)="onValueChange($event, '4๏ธโƒฃ End')"
(focus)="onFocus('4๏ธโƒฃ End')"
(blur)="onBlur('4๏ธโƒฃ End')"
></ix-date-input>
</div>
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap">
<button
type="button"
(click)="setDateRange()"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #673ab7; color: white">
Set 2024 Range
</button>
<button
type="button"
(click)="setToday()"
style="padding: 0.4rem 0.8rem; font-size: 0.85rem; border: none; border-radius: 4px; cursor: pointer; background-color: #ff9800; color: white">
Set Today
</button>
</div>
</div>
</div>

<!-- Event Logs -->
<div style="border: 1px solid #ddd; border-radius: 8px; padding: 1rem">
<h4 style="margin: 0 0 0.5rem 0; color: #333">๐Ÿ“‹ Event Logs</h4>
<div style="max-height: 300px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 4px; padding: 0.5rem; background-color: white; font-family: monospace; font-size: 0.85rem">
<div *ngIf="logs.length === 0" style="color: #666; font-style: italic">
No events yet. Interact with the date inputs above to see logs here.
</div>
<div *ngFor="let log of logs" [style.color]="getLogColor(log)" style="margin-bottom: 0.25rem">
{{ log }}
</div>
</div>
</div>
</div>
Loading
Loading