We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfDatePicker allowedit="false" i can't change value with keyboard but can modify value with calendar popup


i have a sfDatePicker in a Template Grid , is allowedit="false", i can't typing, but i can show calendar popup and change the value:

<SfDatePicker ID="EndDate" @bind-Value="@(record.EndDate)"  AllowEdit="false" FloatLabelType="FloatLabelType.Always" Placeholder="Fecha Baja" Format="dd/MM/yyyy">

if the control is allowedit false, should not allow change value, version in .43 same effect


3 Replies

UD UdhayaKumar Duraisamy Syncfusion Team January 26, 2023 08:30 AM UTC

If the AllowEdit property is set to false, the SfDatePicker will not allow the user to change the value by typing. However, the user can still select/change the date value through the popup; this is the intended behavior of the component.

API – Documentation: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Calendars.SfDatePicker-1.html#Syncfusion_Blazor_Calendars_SfDatePicker_1_AllowEdit

SC Sergio Cabello January 26, 2023 09:10 AM UTC

thank's for reply

i guess then need use Enabled and a variable Enabled=@isAdd, because need, user can change value datepicker in adding but not in update

best regards

UD UdhayaKumar Duraisamy Syncfusion Team January 27, 2023 11:14 AM UTC

You can use the "Enabled" or "ReadOnly" properties to restrict user interaction with the DatePicker component. Refer to our documentation on the Syncfusion website for more information. Let us know if you have any further questions.


Live Chat Icon For mobile
Up arrow icon