This is a migrated thread and some comments may be shown as answers.

[Solved] Adding a CSS class through InputHtmlAttributes

1 Answer 729 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Radoslav Semerdjiev
Top achievements
Rank 1
Radoslav Semerdjiev asked on 10 Dec 2010, 12:02 PM
Hi All,

I am using the MVC DatePicker control and I have an issue trying to add an additional CSS class using the InputHtmlAttributes method. Ultimately I'd like to be able to enable or disable all my input elements by filtering on those having being declared of this class. The problem is that the drop-down calendar is not being displayed any more. Here is my statement:

Html.Telerik().DatePicker()
              .Name("cutoffDate")
              .ShowButton(true)
              .Value(Model.ValuationDate)
              .InputHtmlAttributes(new { @class = "changeableInput" })

and here is how it is being rendered:

<div class="t-widget t-datepicker" id="cutoffDate"><input class="changeableInput" id="cutoffDate-input" name="cutoffDate" value="30/05/2010" /><a class="t-link t-icon t-icon-calendar" href="#" tabindex="-1" title="Open the calendar">select date</a></div>

This is how it was if I did not add my changeableInput custom class:

<div class="t-widget t-datepicker" id="cutoffDate"><input class="t-input" id="cutoffDate-input" name="cutoffDate" value="30/05/2010" /><a class="t-link t-icon t-icon-calendar" href="#" tabindex="-1" title="Open the calendar">select date</a></div>

Is there a workaround to this issue?

Many thanks,

Radoslav Semerdjiev

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 10 Dec 2010, 12:28 PM
Hello Radoslav,

 
This is a known issue which is already fixed. In order to avoid this erroneous behavior you should upgrade to 2010.3.1110 version (Q3 2010) of Telerik Components for ASP.NET MVC.

Kind regards,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Date/Time Pickers
Asked by
Radoslav Semerdjiev
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or