Coder Social home page Coder Social logo

rileyhawk1417 / reactjs-availability-calendar-tailwind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simpletut/reactjs-availability-calendar

0.0 0.0 0.0 234 KB

Lightweight Availability/Bookings Calendar Built with React & TypeScript

License: MIT License

JavaScript 1.96% TypeScript 73.65% CSS 22.18% HTML 2.21%

reactjs-availability-calendar-tailwind's Introduction

reactjs-availability-calendar

NPM version npm-typescript License

Live Demo

Lightweight Availability/Bookings Calendar Built with React & TypeScript

"Buy Me A Coffee"

ReactJS-Availability-Calendar

Installation:

npm install reactjs-availability-calendar

or

yarn add reactjs-availability-calendar

Usage :

Add Calendar to your component:

import React from 'react'
import Calendar from 'reactjs-availability-calendar'

export default function App() {
  const bookings = [
    {
      from: new Date('2022-07-03'),
      to: new Date('2022-07-30'),
      middayCheckout: true,
    },
    {
      from: '2022-04-08',
      to: '2022-04-13',
      middayCheckout: true,
    },
    {
      from: '2022-09-03T19:20:35.593Z',
      to: '2022-09-22T19:20:35.593Z',
      middayCheckout: false,
    },
  ]

  return (
    <Calendar bookings={bookings} />
  )
}

Default CSS

Please copy and self host the default CSS linked below.

Default CSS
Minified Default CSS

<link href="path/to/your/styles.css" rel="stylesheet">

Settings / Configurations:

bookings

Type: Array of Bookings
Default: []
Example:

[{
  from: '2022-04-08T00:00:00.000Z',
  to: '2022-04-10T00:00:00.000Z',
  middayCheckout: true,
}]

Notes: For best results, Dates should be in valid ISO 8601 format. Learn more
Description: Dates to be shown as unavailable on the calendar

showNumberOfMonths

Type: Number
Default: 12
Options: 12 | 4 | 2 | 1
Description: Number of Months to show

showCurrentYear

Type: Bool
Default: true
Description: Render active Calendar Year

showControls

Type: Bool
Default: true
Description: Render navigation buttons to move forward and previous Calendar Years

showKey

Type: Bool
Default: true
Description: Render Key for the different Calendar States

reactjs-availability-calendar-tailwind's People

Contributors

simpletut 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.