0.1.3 • Published 2 years ago

react-datetime-picker-component v0.1.3

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

npm

React-Datetime-Picker-Component

Quick Start

  • Install by running npm install react-datetime-picker-component or yarn add react-datetime-picker-component.
  • Import with import DateTime from "react-datetime-picker-component";.
  • Add <DateTime onClick={(value) => console.log(value)} />
  • If you need input,
    • import with
      • import DateTime from "react-datetime-picker-component"; OR
      • import { DateTimeInput } from "react-datetime-picker-component";
    • Add
      • DateTime.Input onClick={(value) => console.log(value)} /> OR
      • <DateTimeInput onClick={(value) => console.log(value)} />

Getting started

Usage

import React, { useState } from "react";
import DateTime from "react-datetime-picker-component";

function MyApp() {
  const [value, onChange] = useState(new Date());

  return (
    <div className="App">
      <DateTime.Input onClick={console.log} />
      <DateTime notFixedPosition={true} onClick={console.log} />
    </div>
  );
}

Example

DateTime: Date

DateTime: Date

DateTime: Time

DateTime: Time

License

The MIT License.