How to change placeholders for antd range picker component
Asked Answered
A

1

5

Unlike date picker, range picker of antd has two place holders defaulted to Start Date, End Date

enter image description here

I want to change the placeholders to Start, End.

I have tried the following code which doesn't work as expected

<RangePicker placeholder={"start,end"} />
Allfired answered 8/5, 2022 at 13:22 Comment(0)
S
10

You can pass placeholder as an array of strings for Range Picker

If you are planning to change both the placeholders of the Range Picker, you need to pass them as an array of strings as below.

<RangePicker placeholder={["Start", "End"]} />

enter image description here

Skipton answered 8/5, 2022 at 13:43 Comment(1)
Is it possible to change colour of place holder?Monopode

© 2022 - 2024 — McMap. All rights reserved.