1.0.0 • Published 5 years ago

react-table-timepicker v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

react-table-timepicker

npm.io

Description

Time picker represented in table form

Dependencies

  • React.JS
  • Moment.JS

Installation

npm run install --save react-table-timepicker

Usage

import React, { useState } from 'react';
import { render } from 'react-dom';
import moment from 'moment';
import TimePicker from 'react-table-timepicker';

function App() {
  const [time, setTime] = useState([moment(), moment()]);
  return (
    <div>
      <TimePicker
        setValue={setTime}
        value={time}
        attachElement={(
          <input />
        )}
      />
    </div>
  );
}
render(<App />, document.getElementById('root'));

API

NameTypeDefaultDescription
zIndexNumber1css z-index
maxWidthNumberundefinedcss max-width
maxHeightNumberundefinedcss max-height
position'top','right','bottom','left'mediumposition of the time picker relative to its attach element
defaultValuemoment,momentmoment(), moment()moment instance of begin time and end time
onValueChangeFunction-call back when both start time and end time are selected,two-tuple [moment,moment] which represents start and end time will be passed as arguments
size'small','medium','big'mediumsize of the time picker
attachElementHTMLElement-the attachment for the time picker
originColorCSS Color#66ccffcolor of the table cell
includedColorCSS Colorrgba(102, 204, 255, 0.5)color of the table cell when included between the begin time and end time
selectedColorCSS Color#458badcolor of the table cell when selected as begin time or end time
confirmModalbooleantruewhether to pop up a confirm modal when begin time and end time are both selected
0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago