0.2.4 • Published 2 years ago

datepickerplugin v0.2.4

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

DATEPICKER

A simple and reusable Datepicker component for React

Installation

The package can be installed via npm

npm install datepickerplugin --save

Or via yarn

yarn add datepickerplugin
// react
import { useState } from 'react';
import {DatePicker}  from 'datepickerplugin';

export default function Component() {
    const [ date, setDate ] = useState('');

    return (
        <div>
            <label>Date Picker</label>
            <DatePicker onChange={(value) => setDate(value)}/>
        </div>
    )
}

Props

Prop nameDescriptionDefault valueExample values
onChangeFunction called when the user picks a valid date.n/aonChange={(value) => setDate(value)}
disabledWhether the date picker should be disabled falsetrue
requiredWhether date input should be requiredfalsetrue

Local Development

The master branch contains the latest version of the Datepicker component.

To begin local development:

npm install
npm build-dev
npm start

The last step starts documentation app as a simple webserver on http://localhost:3000.

Keywords

  • ReactJS
  • Date Picker
  • Calendar
  • Date
  • React Component