You need to add class:
<input
className="datePicker"
type="date"
name="date"
defaultValue={currentDate || dateInput}
onChange={(e) => setDateInput(e.target.value)}
required
/>
And in css:
.datePicker {
background-color: red;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.