Kendo UI Datepicker 禁用输入 [英] Kendo UI Datepicker disable typing

查看:21
本文介绍了Kendo UI Datepicker 禁用输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用户能够仅通过其按钮并从弹出窗口中选择日期来更改 Kendo UI 日期选择器的值.如何防止用户在 Datepicker 文本框中输入?我可以禁用文本框而不禁用整个控件吗?

I want users to be able to change a Kendo UI Datepicker value only through its button and selecting the date from the pop-up. How can I prevent users from typing in the Datepicker textbox? Can I disable the textbox without disabling the whole control?

推荐答案

在你的输入元素上添加这个属性和值...

On your input element add this attribute and value...

onkeydown="return false;"

这将禁用键入输入,但仍允许使用日历控件输入.

This will disable typed input and still allow using the calendar control input.

这篇关于Kendo UI Datepicker 禁用输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆