radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.52k stars 786 forks source link

Issue with RadzenDatePicker: "inputmode" set to "none" not working correctly #1189

Closed parente89 closed 1 year ago

parente89 commented 1 year ago

Hello everyone,

I'm working on a project using the RadzenDatePicker component, and I'm trying to disable the keyboard when the control is activated. To do this, I'm using the "inputmode" attribute set to "none" like this:https://forum.radzen.com/guidelines

<RadzenDatePicker Attributes="@(new Dictionary<string, object>() {{"inputmode", "none" }})"></RadzenDatePicker>

However, it seems that setting "inputmode" to "none" is not working as expected. The keyboard continues to be activated when I select the control.

I've checked that RadzenDatePicker supports the "inputmode" attribute, and I've followed the official documentation, but I can't seem to resolve this issue.

Has anyone had experience with this situation or can suggest an alternative solution to disable the keyboard when using RadzenDatePicker?

Thanks in advance for your help!

enchev commented 1 year ago

Hey @parente89,

You can define directly arbitrary attributes for all Radzen components however in this case attributes will be applied to the div wrapper: https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/RadzenDatePicker.razor#L13

You can set AllowInput=false if you do not want user input.

parente89 commented 1 year ago

Hey @parente89,

You can define directly arbitrary attributes for all Radzen components however in this case attributes will be applied to the div wrapper: https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/RadzenDatePicker.razor#L13

You can set AllowInput=false if you do not want user input.

A thousand thanks. AllowInput=false worked for me

Attributes="@(new Dictionary<string, object>{{ "inputmode", "none" }})" I used to insert this, which works in a RadzenTexBox, but doesn't here.