@trackpilots/year-picker
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

@trackpilots/year-picker

npm license downloads

A customizable year picker component built with React and Tailwind CSS.

✨ Screenshots

Screenshot

🚀 Installation

You can install the package using npm or yarn:

Using npm

npm install @trackpilots/year-picker
# or
yarn add @trackpilots/year-picker

Make sure Tailwind CSS is installed in your project.

📌 Usage

Use in Your Component

import React, { useState } from "react";
import YearPicker from "@trackpilots/year-picker";

const App = () => {
  const [selectedYear, setSelectedYear] = useState(null);

  const handleChange = (year) => {
    setSelectedYear(year);
    console.log("Selected Year:", year);
  };


  return (
    <div className="p-4">
      <h2 className="text-lg font-bold">Date Picker</h2>
      <YearPicker
        onChange={handleChange}
      />
      <p>Selected Year: {selectedYear ? selectedYear.year : "None"}</p>
    </div>
  );
};

export default App;

📌 DateFilter Component

A React Select component that allows users to choose a Year

⚙️ Props

Prop Name Type Default Description
onChange function () => {} Triggered when a Year is selected.

✨ Example

<YearPicker 
  onChange={(Year) => console.log("Selected Year:", year)} 
/>

📦 Dependencies

📌 Maintainers

These packages are maintained by Quick App Studio Developers.

📄 License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i @trackpilots/year-picker

Weekly Downloads

5

Version

1.0.11

License

MIT

Unpacked Size

18 kB

Total Files

9

Last publish

Collaborators

  • sakthivelgovinthan