KendoUI formatting input text

When I started evaluating with KendoUI one thing that really puzzled me is how do I (consistently) displayed an input for text if I did not want to use autocomplete.
When I checked out for available widgets I could not find such basic control. The result was that those input did not have the same aspect.

Kendo UI Inconsistent aspect for text input
Inconsistent aspect for text input

Kendo UI styled input fields for text

The (non-documented solution) solution (thought pointed out as answer in KendoUI forums) is easy to implement, even that not homogenous with other input definitions: in the container of input field add a class attribute specifying k-textbox:

<div class="k-textbox"><input type="text" /></div>

And now you will get:

Kendo UI fixing text input style
Text input styles

Realize the difference between adding k-textbox to the input (third row) compared to applying it to its container (fourth row).

If you want to see the code and play with it click here.


One thought on “KendoUI formatting input text

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s