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

DatePicker without placeholder

3 Answers 1100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zarko Petrovic
Top achievements
Rank 1
Zarko Petrovic asked on 11 Jan 2019, 12:57 PM

Hi,

Is it possible to have a DatePicker without any placeholder, just an empty text-box.

 

Thanks,

Zarko

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Jan 2019, 08:56 AM
Hello, Zarko,

This is theoretically possible by setting a format that does not have a separator between, days, months and year and using a CustomFormatPlaceholder with space instead of a word:

https://www.telerik.com/kendo-react-ui/components/dateinputs/api/DateInputCustomFormatPlaceholder/

https://stackblitz.com/edit/react-hmgdy9?file=app/main.js

Still, this can be used only with some formats.

In general, we have the placeholder shown all the time, as otherwise, it could be difficult to the end user to guess the correct date format.

If there is a use case where removing the placeholder will not affect the user experience, please share it with us and submit a feature request to make this option available in the DatePicker:

https://feedback.telerik.com/kendo-react-ui

Regards,
Stefan
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Zarko Petrovic
Top achievements
Rank 1
answered on 21 Jan 2019, 01:01 PM

Hi Stefan,

Yes, I understand that if could be difficult to the end user to guess the correct date format. Is then there a way to dim the placeholder so user can distinct the fields with values from ones with placeholders. As you can see from attached image, we have several DatePickers next to each other and at a first glance it is difficult to tell the difference between the one that is actually populated and the ones that only have placeholders.

0
Stefan
Telerik team
answered on 22 Jan 2019, 07:22 AM
Hello, Zarko,

A similar result can be achieved by dynamically adding or removing a class from the input based on the value.

This example shows how to add the class to the input and the logic can be extended depending on the app logic to add it and remove it conditionally:

https://stackblitz.com/edit/react-chknih?file=index.html

Regards,
Stefan
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Zarko Petrovic
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Zarko Petrovic
Top achievements
Rank 1
Share this question
or