<SfNumericTextBox TValue="int?" HtmlAttributes="@attr"></SfNumericTextBox>
@code {
public Dictionary<string, object> attr = new Dictionary<string, object>() {
{ "type", "tel" }
};
}
|
any chance this can go to component by default?
Hi,
any chance this gets in the documentation?
It's very inconvenient that the numeric keyboard is not the default for the Syncfusion's Numeric Keyboard (!?) but it is also frustrating that one should browse the forums to find out how to enable this.
Best regards,
Ivan
In the Syncfusion Numeric TextBox component, you can directly use type= “number” to open the Numeric keyboard while focusing on the component.
<SfNumericTextBox TValue="int?" type="number"></SfNumericTextBox> |
Reference :
Also, we will add the above details to our documentation and refresh it in any one of our upcoming releases.
Hi,
The issue with this solution is that it displays the native browser arrows when the input has the focus :
https://blazorplayground.syncfusion.com/BjLfNgshyKWRXKLk
Hi Harold,
Greetings from Syncfusion Support!
Thank you for bringing this issue to our attention.
To resolve the concern regarding the display of native browser arrows when focusing on the component, we recommend utilizing the "HTMLAttributes" property to configure the appropriate numeric keyboard option. This approach ensures compatibility and consistent behavior across devices.
Below is a code snippet demonstrating this solution:
<SfNumericTextBox TValue="int?" HtmlAttributes="@attr"></SfNumericTextBox> @code { public Dictionary<string, object> attr = new Dictionary<string, object>() { { "type", "tel" } }; } |
You can access the sample illustrating this approach here: https://blazorplayground.syncfusion.com/VDhzNKLsMlCZHCEg
By focusing on the component with this setup, you'll notice that the native arrow keys are not displayed on desktop devices, addressing the concern you raised.
For further details, you can refer to our API Reference here: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfNumericTextBox-1.html#Syncfusion_Blazor_Inputs_SfNumericTextBox_1_HtmlAttributes
Should you have any additional questions or require further assistance, feel free to reach out.