在文本框上禁用游标时出现问题

时间:2016-05-25 14:34:43

标签: asp.net-mvc

在我的应用程序中,我有一个日历,我不应该允许用户输入日期。并且tab也应该在该文本框上工作。以下代码在文本框中启用光标。

@Html.TextBoxFor(m => m.Pickup_Schedule_Date, new { @class = "dpicker", @placeholder = "mm/dd/yyyy", @id = "Pickupdate",@style = "cursor:pointer;" })

1 个答案:

答案 0 :(得分:0)

试试这个

@Html.TextBoxFor(m => m.Pickup_Schedule_Date, new { @class = "dpicker", @placeholder = "mm/dd/yyyy", @id = "Pickupdate",@style = "cursor:pointer;" disabled = "disabled", @readonly = "readonly" })