Socket
Socket
Sign inDemoInstall

react-pikaday-datepicker

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-pikaday-datepicker

React component wrapper around Pikaday.js


Version published
Maintainers
1
Created

Readme

Source

React Pikaday Datepicker

Based on https://www.npmjs.com/package/react-pikaday-datepicker

build status npm version Download Count

Universal React component wrapper around Pikaday.js datepicker.

Install

npm install react-pikaday-datepicker --save

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import DatePicker from 'react-pikaday-datepicker';

class App extends React.Component {
  constructor() {
    super();

    this.state = {};
  }

  onDateChange(date) {
    this.setState({ date });
  }

  render() {
    const { date } = this.state;

    return (
      <div>
        <DatePicker 
            placeholder="Select Date"
            format="YYYY/MM/DD"
            maxDate={new Date('2020-07-26')}
            value={new Date(date)}
            onChange={::this.onDateChange}
        />
    </div>
    );
  }
}

ReactDOM.render(
    <App />,
    document.getElementById('example')
);

Properties

  • value
  • onChange
  • valueLink
  • tabIndex
  • Pikaday configuration options (except onSelect and field)
  • other input attributes like className, name, placeholder, disabled and readOnly

MIT Licensed

Keywords

FAQs

Last updated on 07 Oct 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc