Skip to content

Flower-dev/datePicker_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATEPICKER

A simple and reusable Datepicker component for React JS

datepicker

Installation

The package can be installed via npm

npm install datepickerplugin --save

Or via yarn

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

// -------------

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

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

export default Component;

Props

Prop name Description Default value Example values
onChange Function called when the user picks a valid date. n/a onChange={(value) => setDate(value)}
disabled Whether the date picker should be disabled  false true
required Whether date input should be required false true

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
  • React
  • Component

About

A simple and reusable Datepicker component for React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published