2.0.2 • Published 1 year ago

react-samay v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Samay

npm Node.js CI

Time picker for React.js

This is a fork from rc-time-picker, which is no longer maintained. I have also mixed styling support from time-picker-io.

Features

  • Uses native date object
  • Dropdown based hours, minutes, seconds & meridiem selection.
  • Keyboard navigation
  • Similar API as rc-time-picker
  • Written with Typescript, with built-in typings

Install

npm i --save react-samay

Usage

import { TimePicker } from 'react-samay';
import ReactDOM from 'react-dom';

// import css file
import 'react-samay/index.css';

ReactDOM.render(
  <TimePicker
    value={new Date()}
    onChange={(date) => {
      console.log(date);
    }}
  />,
  <div id="app" />,
);

You can find more storybook examples here.

API

TimePicker

NameTypeDefault
prefixClsString'react-samay'
disabledBooleanfalse
openBooleanfalse
defaultValueDatenull
defaultOpenValueDatenew Date()
valueDatenull
placeholderString''
classNameString''
inputClassNameString''
nameString-
idString''
showHourBooleantrue
showMinuteBooleantrue
showSecondBooleantrue
formatString-
disabledHoursFunction-
disabledMinutesFunction-
disabledSecondsFunction-
use12HoursBooleanfalse
hideDisabledOptionsBooleanfalse
onChangeFunctionnull
onAmPmChangeFunctionnull
onOpenFunction({ open })
onCloseFunction({ open })
hourStepNumber1
minuteStepNumber1
secondStepNumber1
2.0.2

1 year ago

2.0.0-2

1 year ago

2.0.0-1

1 year ago

2.0.0-0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.1.0

3 years ago