1.0.3 • Published 3 years ago

react-date-time-picker-popup v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-date-time-picker-popup

Calendar, interval time picker and popup components for React supports multi-languages

NPM JavaScript Style Guide

Install

yarn add react-date-time-picker-popup

Usage

import React, { useState } from 'react'
import { Popup, DatePicker } from 'react-date-time-picker-popup'
import 'react-date-time-picker-popup/dist/index.css'

const App = () => {
  const [visible, setVisible] = useState(false);
  const [day, setDay] = useState(new Date());

  return <div className='App'>
    <button onClick={() => setVisible(true)}>Show Popup</button>
    <Popup visible={visible} setVisible={setVisible}>
      <DatePicker lang="tr" selectedDay={day} setSelectedDay={setDay} timeSelector={true} />
    </Popup>
  </div>
}

export default App

npm.io

DatePicker

propstypedefaultrequired
langstring'en'false
selectedDayDatetrue
setSelectedDayfunctrue
timeSelectorbooleantruefalse
minuteIntervalnumber5false
BGColorstringrgb(44, 76, 104)false
disabledHoursarrayfalse
disabledMinutesarrayfalse

Popup

propstypedefaultrequired
visiblebooleantrue
setVisiblefunctrue
BGColorstringrgb(44, 76, 104)false
childrenReact.ReactNodefalse

Time

propstypedefaultrequired
yearnumbertrue
monthnumbertrue
dayDatetrue
setDayfunctrue
selectedMinutestringtrue
setSelectedMinutefunctrue
selectedHourstringtrue
setSelectedHourfunctrue
minuteIntervalnumber5false
disabledHoursarrayfalse
disabledMinutesarrayfalse
BGColorstringrgb(44, 76, 104)false

License

MIT © kursatsmsek