1.0.4 • Published 5 years ago

@neoaren/date-picker v1.0.4

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

Date Picker

NPM NPM Minzipped size NPM Download Week JavaScript Style Guide NPM License

📅 A modern and easy-to-use React date picker component

Install

Install the date picker

npm install --save @neoaren/date-picker

Peer dependencies

This component uses React >=16.8.0 and React DOM >=16.8.0 as peer dependencies.

Install them using npm

npm install --save react react-dom

Usage

import React from 'react';
import DatePicker from '@neoaren/date-picker';

const App = () => {

  return (
    <DatePicker id="my-datepicker" />
  );

};

Component API

NameTypeRequiredDescription
idStringtrueThe unique identifier of the date picker element.
defaultValueNumber DatefalseThe default value of the date picker.
onChangeFunctionfalseThis function runs when the selected date changes. The new date passed as the only parameter is an instance of Date.
placeholderStringfalseThe text to be displayed when no date is selected.
langStringfalseSet the language of the date picker, the default is English. Use the ISO 8601-1 format (e.g. "en")

License

MIT © NeoAren