"use client";
import { useState } from "react";

function SearchDate() {
  const todayISO = new Date().toLocaleDateString("en-CA");
  const [date, setDate] = useState(todayISO);

  return (
    <>
      <form className="containerForm">
        <label className="label">Fecha</label>
        <div className="groupInput">
          <input
            type="date"
            value={date}
            onChange={(e) => setDate(e.target.value)}
            placeholder="Selecciona una fecha..."
          />
          <button className="button buttonSearch" type="submit">
            Buscar
          </button>
        </div>
      </form>
    </>
  );
}

export default SearchDate;
//IO
//By Tyrannuss
