You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-pick-time-range

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pick-time-range

Time Range Slots Picker for React

1.0.4
latest
Source
npmnpm
Version published
Weekly downloads
5
-73.68%
Maintainers
1
Weekly downloads
 
Created
Source

React Pick Time Range Slot (react-pick-time-range)

NPM version Build npm-typescript License

Simple & customized time slots picker for React

Live Demo

Installation:

npm install react-pick-time-range

or

yarn add react-pick-time-range

Add the following bootstrap code in index.js or index.ts of your project. The UI will look ugly if not added.

import 'bootstrap/dist/css/bootstrap.css'

Usage :

Add PickTime to your component:

import React from 'react'
import ReactDOM from 'react-dom/client'
import { PickTime } from 'react-pick-time-range'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
        <div>
            <h2>Time Range Picker Demo</h2>
            <PickTime
              onError={(error, timings) => {
                console.log('On Error', error, timings)
              }}
              onSave={(timings) => {
                console.log('Data', timings)
              }}
              onSlotsFilled={() => {
                alert('All slots are filled')
              }}
              scheduledTimings={[
                ['01:00', '01:30'],
                ['17:30', '18:00'],
              ]}
              timeFrame={30}
            />
        </div>
    </React.StrictMode>,
)

Keywords

react

FAQs

Package last updated on 23 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts