Socket
Socket
Sign inDemoInstall

@reaktor/react-pikaday-component

Package Overview
Dependencies
0
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @reaktor/react-pikaday-component

React component wrapper around Pikaday.js


Version published
Weekly downloads
2
Maintainers
5
Install size
40.8 kB
Created
Weekly downloads
 

Readme

Source

ReactPikadayComponent

build status npm version Download Count

Universal React component wrapper around Pikaday.js datepicker.

Install

npm install react pikaday react-pikaday-component --save

Usage

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

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 31 Aug 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