GithubHelp home page GithubHelp logo

sushantdhiman / react-samay Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 3.44 MB

Time picker for React.js

Home Page: https://sushantdhiman.com/projects/react-samay

License: MIT License

JavaScript 0.62% TypeScript 94.74% CSS 4.64%
react time-picker timepicker react-time-field react-timepicker

react-samay's Introduction

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

Name Type Default
prefixCls String 'react-samay'
disabled Boolean false
open Boolean false
defaultValue Date null
defaultOpenValue Date new Date()
value Date null
placeholder String ''
className String ''
inputClassName String ''
name String -
id String ''
showHour Boolean true
showMinute Boolean true
showSecond Boolean true
format String -
disabledHours Function -
disabledMinutes Function -
disabledSeconds Function -
use12Hours Boolean false
hideDisabledOptions Boolean false
onChange Function null
onAmPmChange Function null
onOpen Function({ open })
onClose Function({ open })
hourStep Number 1
minuteStep Number 1
secondStep Number 1

react-samay's People

Contributors

dependabot[bot] avatar sushantdhiman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.