I am trying to add an SVG icon into react-datepicker input but seems like I can't add it with css input so I created a new element for icon and trying to create a function when click into icon the react-datepicker will open.
Here is my following code:
<DatePicker
selected={dateInput}
onChange={(date) => setDateInput(date)}
minDate={moment().toDate()}
showPopperArrow={false}
/>
<span>
<CalendarIcon />
</span>
Here is my project look like:
