Kendo UI Datepicker / DateTimePicker Disable Typing

Membuat field Kendo Datepicker / DateTimePicker tidak bisa di input melalui keyboard.
Tinggal menambahkan attribut onkeydown.
Contoh penggunaan pada form.cshtml

[code language=”html”]

<input id="StartDate" onkeydown="return false"/>

<!–atau–>

@Html.EditorFor(model =&gt; model.StartDate, new { htmlAttributes = new { @onkeydown = "return false" } })

[/code]

Randy Kurnia has written 11 articles

2 thoughts on “Kendo UI Datepicker / DateTimePicker Disable Typing

    1. Randy Kurnia says:

      oh yang dari template ya ko,
      kalo pake attribute disable / readonly
      field datetime nya malah gak bisa di isi / di pilih sama sekali dari kendo date picker nya,
      hehehe

      jadi saya pake attribute onkeydown supaya field nya gak bisa di input dari keyboard
      jadi cman bisa di input lewat kendo date picker aja,

      CMIIW
      😀

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>