diff --git a/packages/components/src/components/input-number/controller.ts b/packages/components/src/components/input-number/controller.ts index a784c757ec..c2c8f6b295 100644 --- a/packages/components/src/components/input-number/controller.ts +++ b/packages/components/src/components/input-number/controller.ts @@ -72,7 +72,7 @@ export class InputNumberController extends InputIconController implements InputN // set the value here when the value is switched between blank and set (or vice versa) to enable value resets via setting null as value. if (!!(event.target as HTMLInputElement).value !== !!this.component._value) { - this.component._value = (event.target as HTMLInputElement).value as number | Iso8601; + this.component._value = parseFloat((event.target as HTMLInputElement).value); } } diff --git a/packages/components/src/components/input-number/shadow.tsx b/packages/components/src/components/input-number/shadow.tsx index 9da094ecba..d8dfb22e5e 100644 --- a/packages/components/src/components/input-number/shadow.tsx +++ b/packages/components/src/components/input-number/shadow.tsx @@ -11,7 +11,6 @@ import type { InputNumberStates, InputTypeOnDefault, InputTypeOnOff, - Iso8601, KoliBriHorizontalIcons, LabelWithExpertSlotPropType, MsgPropType, @@ -171,12 +170,12 @@ export class KolInputNumber implements InputNumberAPI, FocusableElement { /** * Defines the largest possible input value. */ - @Prop() public _max?: number | Iso8601; + @Prop() public _max?: number; /** * Defines the smallest possible input value. */ - @Prop() public _min?: number | Iso8601; + @Prop() public _min?: number; /** * Defines the properties for a message rendered as Alert component. @@ -255,7 +254,7 @@ export class KolInputNumber implements InputNumberAPI, FocusableElement { /** * Defines the value of the input. */ - @Prop({ mutable: true, reflect: true }) public _value?: number | Iso8601 | null; + @Prop({ mutable: true, reflect: true }) public _value?: number | null; @State() public state: InputNumberStates = { _autoComplete: 'off', @@ -322,12 +321,12 @@ export class KolInputNumber implements InputNumberAPI, FocusableElement { } @Watch('_max') - public validateMax(value?: number | Iso8601): void { + public validateMax(value?: number): void { this.controller.validateMax(value); } @Watch('_min') - public validateMin(value?: number | Iso8601): void { + public validateMin(value?: number): void { this.controller.validateMin(value); } @@ -397,7 +396,7 @@ export class KolInputNumber implements InputNumberAPI, FocusableElement { } @Watch('_value') - public validateValue(value?: number | Iso8601 | null): void { + public validateValue(value?: number | null): void { this.controller.validateValueEx(value); } diff --git a/packages/components/src/schema/components/input-number.ts b/packages/components/src/schema/components/input-number.ts index 6f0b9766b9..99444c40a3 100644 --- a/packages/components/src/schema/components/input-number.ts +++ b/packages/components/src/schema/components/input-number.ts @@ -17,14 +17,14 @@ import type { PropSyncValueBySelector, PropTouched, } from '../props'; -import type { InputTypeOnDefault, InputTypeOnOff, Iso8601, KoliBriHorizontalIcons, OptionalInputProps, Stringified, W3CInputValue } from '../types'; +import type { InputTypeOnDefault, InputTypeOnOff, KoliBriHorizontalIcons, OptionalInputProps, Stringified, W3CInputValue } from '../types'; import type { ButtonProps } from './button'; type RequiredProps = PropLabelWithExpertSlot; type OptionalProps = { msg: Stringified; placeholder: string; -} & OptionalInputProps & +} & OptionalInputProps & PropHideError & PropSuggestions;