npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-calendar-lunar

v5.0.0

Published

![npm](https://img.shields.io/npm/v/react-calendar-lunar?color=blue) ![npm](https://img.shields.io/npm/dw/react-calendar-lunar)

Downloads

12

Readme

react-calendar-lunar

npm npm

react-calendar-lunar is an npm package built to provide an easy-to-use lunar and solar calendar component for your React applications. This package helps you display events, holidays, and additional information based on the lunar and solar calendar.

Features

  • Display both lunar and solar calendars on the same interface.
  • Support for multiple languages and time zones.
  • Easy integration into existing React applications.
  • Flexible customization of colors, styles, and display of dates.
  • Provide events, holidays, and additional information based on the lunar and solar calendar.
  • Support date selection and event handling.

Installation

Using npm:

npm install react-calendar-lunar

Using Yarn:

yarn add react-calendar-lunar

Usage

First, import the package into your project:

import { Calendar, SelectCalendarLunar } from 'react-calendar-lunar';

Then, you can use the <Calendar /> | <SelectCalendarLunar /> component in your React application:

import React from 'react';
import { Calendar } from 'react-calendar-lunar';

const App = () => {
  return (
    <div>
      <h1>Lunar and Solar Calendar</h1>
      <Calendar />
    </div>
  );
};

export default App;
import React from 'react';
import { SelectCalendarLunar } from 'react-calendar-lunar';

const App = () => {
  const [date, setDate] = useState(new Date());
  return (
    <div>
      <h1>Lunar and Solar Calendar</h1>
      <SelectCalendarLunar
        value={date}
        handleSelect={(args) => setDate(args.date)}
        format='dd/mm/yyyy'
      />
    </div>
  );
};

export default App;

You can also customize the properties and handle events of the <Calendar /> component according to your needs.

<Calendar
  value={new Date()}
  customStyle={{
    background: 'red',
  }}
  handleSelect={(args) => {}}
/>

API

Props

| Prop | Type | Description | | ------------ | -------- | --------------------------------------------------------------- | | value | string | Object Date Javascript | | handleSelect | function | Handler function when a date is selected | | customStyles | object | Custom CSS for elements within the calendar (see details below) |

Events

| Event | Description | | ------------ | ----------------------------- | | handleSelect | Fired when a date is selected |

Customizing the UI

You can customize the UI of react-calendar-lunar by passing custom CSS values through the customStyles prop. Below are some CSS properties that you can use to customize the UI:

const customStyles = {
  backgroundColor: 'white',
  borderRadius: '4px',
  boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
};

Contribution

If you encounter any issues, have feature requests, or suggestions for improvements, please create an issue on the GitHub repository of this package.

We welcome and appreciate contributions, and we will try