Proper way to hide calendar icon (suffix icon) in DatePicker for AntD

Viewed 4048

This is the way I am hiding the calender icon in the DatePicker component for antD React. It feels hacky, is it the only way?

Attribute:

suffixIcon={<div></div>} 

Full Component:

<DatePicker 
  bordered={false} 
  format="MMM Do, YYYY" 
  defaultValue={new moment()} 
  allowClear={false} 
  suffixIcon={<div></div>} 
/>
2 Answers

Try pass null to

suffixIcon={null}

Its very late still, you can do like:

.ant-input-suffix {display: none;}
Related