Giter Club home page Giter Club logo

daydreamer's Introduction

Daydreamer

Daydreamer is a lightweight, customizable datepicker component built for React applications. Utilizing date-fns for date operations, Daydreamer offers a flexible solution for integrating date selection within your projects. Whether you need a simple date picker or a more complex calendar-based component, Daydreamer is designed to meet your needs with ease.

Still adding features, not yet "complete"

Features

  • Lightweight and easy to integrate
  • Customizable date formats and locales
  • Built with React 18 and date-fns
  • Provides both date input fields and a calendar view for date selection

Installation

To install Daydreamer, you can use npm or yarn as follows:

npm install daydreamer
# or
yarn add daydreamer

Usage

To use Daydreamer in your project, import the Datepicker component and add it to your component tree. Here's a basic example:

import React from 'react';
import { Datepicker } from 'daydreamer';

function App() {
  const handleDateChange = (date) => {
    console.log('Selected date:', date);
  };

  return (
    <div>
      <Datepicker onDateChange={handleDateChange} />
    </div>
  );
}

export default App;

Props

Prop Type Description
locale Locale Optional. Sets the initial locale for the datepicker.
onDateChange function Callback function that is called with the new date whenever the selected date changes.

Development

To run Daydreamer locally for development, you can follow these steps:

  1. Clone the repository.
  2. Install dependencies:
npm install
  1. Start the development server:
npm run dev

This will launch the Vite development server, making the project available at http://localhost:3000.

Building for Production

To build Daydreamer for production, run the following command:

npm run build

This command compiles the TypeScript code and bundles the project using Vite, preparing it for deployment.

Contributing

Contributions to Daydreamer are always welcome! Whether it's bug reports, feature requests, or pull requests, your help is appreciated. Please read our contributing guidelines before submitting your contributions.

License

Daydreamer is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements

Date-fns and Theo for the inspiration.

daydreamer's People

Contributors

aaarslan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.