Select to view content in your preferred language

calcite-input-number with leading zero

806
10
Jump to solution
04-16-2025 02:55 PM
SebastianKrings
Frequent Contributor

Using the calcite-input-number I would like to achieve leading zeros.

In the specific case the input ranges from 0 to 360 degrees.

So the following input should automatically show the exprected result within the input

0000
1001
10010
100100
360360

 

My input currently looks like this:

<calcite-input-number
            [min]="courseRange.min" [max]="courseRange.max" step="1"
            label="Course (in Degrees)"
            [value]="course()"
(calciteInputNumberChange)="refreshNumberChanged($event, course)"/>

 

refreshNumberChanged is used to write back the value into a signal. This replaces former ngModel syntax.

 

0 Kudos
10 Replies
UndralBatsukh
Esri Regular Contributor

https://github.com/Esri/calcite-design-system/issues/11987 - you should have access to this issue as long as you have github account