() => {
  const [startDate, setStartDate] = useState(new Date());
  const ExampleCustomInput = React.forwardRef(
    ({ value, onClick }, ref) => (
      <button className="example-custom-input" onClick={onClick} ref={ref}>
        {value}
      </button>
    ),
  );
  return (
    <DatePicker
      selected={startDate}
      onChange={date => setStartDate(date)}
      customInput={<ExampleCustomInput />}
    />
  );
};

() => {
  const [startDate, setStartDate] = useState(new Date());
  const ExampleCustomInput = ({ value, onClick }) => (
    <button className="example-custom-input" onClick={onClick}>
      {value}
    </button>
  );
  return (
    <DatePicker
      selected={startDate}
      onChange={date => setStartDate(date)}
      customInput={<ExampleCustomInput />}
    />
  );
};

--- 
+++ 
@@ -1,11 +1,9 @@
 () => {
   const [startDate, setStartDate] = useState(new Date());
-  const ExampleCustomInput = React.forwardRef(
-    ({ value, onClick }, ref) => (
-      <button className="example-custom-input" onClick={onClick} ref={ref}>
-        {value}
-      </button>
-    ),
+  const ExampleCustomInput = ({ value, onClick }) => (
+    <button className="example-custom-input" onClick={onClick}>
+      {value}
+    </button>
   );
   return (
     <DatePicker
Fix doc-site example for custom input
