Last Updated: 15 Sep 2021 14:11 by ADMIN
Created on: 26 Apr 2021 05:09
Category: NumericTextBox
Type: Feature Request

The value of the NumericTextbox is of type number. 

Please allow also null and undefined as valid types for the value field.

I like to force a user input into the without setting a default value.

In this case I want to set the value to null. If I do this, the type checker complains that null is not a valid type for the value field.



    selector: 'my-component',
    template: '<kendo-numerictextbox [value]="__value" (valueChange)="onValueChange($event)"></kendo-numerictextbox>',
export class MyComponent {
    public __value: number | null = null;   

    public onValueChange(value: number|null): void {
        this.__value = value;

1 comment
Dimiter Madjarov
Posted on: 30 Apr 2021 05:43

Hi Markus,

I would suggest to try setting the type of the numerictextbox value directly to number in this case. This should not prevent setting the value to null for scenarios in which there should not be a default set.

Please let me know if this information helps or I could provide further assistance.

Dimiter Madjarov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.