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

Adding a place holder to date field

3 Answers 2041 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Chinonso
Top achievements
Rank 1
Chinonso asked on 15 May 2018, 09:54 PM

     Hi there guys, as the title states, i am try to add a placeholder  to a date field.

<div class="form-group">
   @(Html.Kendo().DatePicker()
          .Name("DateReceived")
          .Format("dd-MMM-yy")
          .DateInput()
          .HtmlAttributes(new { style = "width: 90%", title = "DateReceived", placeholder="Enter A Date"})
    )
</div>

 

but regardless of what i do, it doesn't show the placeholder value. What can i do to remedy this?

 

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 17 May 2018, 10:53 AM
Hello Chinonso,

By default when DateInput is enabled it will render placeholder for each the date, month, and year automatically. Thus, in such scenario specifying another placeholder is not available. 

If having the custom placeholder text is a must I can suggest removing the DateInput option from the configuration. This way the placeholder will be displayed in the DatePicker.


Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Lisa
Top achievements
Rank 1
answered on 13 Oct 2020, 01:13 PM

Hello Viktor,

I have the same problem as Chinonso and was wondering if there is a workaround or anything now to get both functionalities working? Has anything changed in the past 2 years?

Kind regards,

Lisa

0
Viktor Tachev
Telerik team
answered on 15 Oct 2020, 09:18 AM

Hello Lisa,

 

I am afraid that currently showing an additional placeholder in the DateInput is not available out of the box.

 

Having an additional placeholder over the one shown by the DateInput would likely be confusing for the end-user. In addition having another placeholder can interfere with the functionality of the component. 

 

Regards,
Viktor Tachev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Date/Time Pickers
Asked by
Chinonso
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Lisa
Top achievements
Rank 1
Share this question
or