javascriptreactjsreact-datepicker

react-datepicker how do i increase the height of the inputbox?


how do i increase height of datepicker input box ?

i am using "react-datepicker/dist/react-datepicker.css";

using inline css doesnt work

    <DatePicker 
              style={{root: {height: 7000} }}
      selected={startDate}
      onChange={onDateChange}
      startDate={startDate}
      endDate={endDate}
      selectsRange

          
              />

i am using "react-datepicker/dist/react-datepicker.css";

using inline css doesnt work


Solution

  • You can add custom class to your input

    <DatePicker
        dateFormat="yyyy/MM/dd"
        selected={startDate}
        onChange={selectDateHandler} 
        minDate={today}
        todayButton={"Today"}
        className="customInput"
    />
    

    css

    .customInput {
        height: 10px;
    }