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

DatePicker formatPlaceHolder prop types

1 Answer 268 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Moises
Top achievements
Rank 1
Moises asked on 29 Nov 2018, 04:28 PM

I am trying to set the formatPlaceHolder prop on a DatePicker component using the CustomFormatPlaceHolder object per the docs at:

https://www.telerik.com/kendo-react-ui/components/dateinputs/datepicker/placeholders/

This does the correct thing in the rendered component, however, setting the formatPlaceHolder with an object causes my tests to fail the prop types check for this component with message:

Warning: Failed prop type: Invalid prop `formatPlaceholder` of value `[object Object]` supplied to `DatePicker`, expected one of ["wide","narrow","short","formatPattern",null].

 

Is there something I am doing wrong here?

Here is my component:

<DatePicker
id="dateOfOccurence"
name="dateOfOccurence"
format="MM/dd/yyyy"
formatPlaceholder={{ month: 'mm', day: 'dd', year: 'yyyy' }}
/>

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 30 Nov 2018, 08:52 AM
Hello, Moises,

Thank you for reporting this.

There is indeed a wrong PropType definition on our side and we will fix it. You can track the progress here:

https://github.com/telerik/kendo-react/issues/137

Additionally, I updated your Telerik points for bringing this to our attention.

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
Moises
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or