numeric text box value disappears when set to 0

When using a numeric text box that is bound to an integer it will initialize to 0 OK, but when setting the value to 0, either with the up/down arrows or typing in 0, the 0 value disappears after the control loses focus.

this is with version 18.2.0.56, the current latest version.

see attached zip for full working demo.

<SfNumericTextBox TValue="int" @bind-Value="@myInt" Max=1000 Min=-2 Step=1 Format="####" Width="100px">
</SfNumericTextBox>

@code{
    int myInt;
}
 

Attachment: SFNumericTextBoxBug_f52aff8a.zip

3 Replies 1 reply marked as answer

JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team September 10, 2020 03:23 PM UTC

Hi Joshua, 

Greetings from Syncfusion support. 

We have checked your query. We would like to inform you that if the format specifier is used, then value zero will not be displayed and it is the behavior in C#. So we suggest you to use specifier as “####0” to resolve the issue at your end. Please refer the below link Microsoft documentation link  for further references. 


Please let us know if you need any further assistance on this. 

Regards, 
Jeyanth. 


Marked as answer

JL Joshua Lapinski September 17, 2020 09:42 PM UTC

thanks! this resolved the '0' issue, though this revealed another issue with applying the format. I opened a new ticket for this issue: https://www.syncfusion.com/forums/157949/numeric-text-box-custom-format-not-applied



JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team September 18, 2020 08:16 AM UTC

Hi Joshua, 

Most welcome. We are always happy to assist you. We suggest you to follow the newly created forum for the next reported query. 

Regards, 
Jeyanth. 


Loader.
Up arrow icon