reactjsdateinputonclickmouseclick-event

How could i reach click event to get date calender in input type="date" when click button


enter image description here i cant get render the calender box while clicking button.


Solution

  • const [date , setdate] = useState();
    
    <input type="date" onChange={(e)=>{setdate(e.target.value);alert(date)} }  />