Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-flatpickr

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-flatpickr - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

11

build/index.js

@@ -15,4 +15,2 @@ 'use strict';

var _reactDom = require('react-dom');
var _flatpickr = require('flatpickr');

@@ -51,3 +49,2 @@

value: function componentDidMount() {
var node = (0, _reactDom.findDOMNode)(this.refs.input);
var options = _extends({}, this.props.options, {

@@ -57,3 +54,3 @@ onChange: this.props.onChange

this.flatpickr = new _flatpickr2.default(node, options);
this.flatpickr = new _flatpickr2.default(this.node, options);
}

@@ -63,2 +60,4 @@ }, {

value: function render() {
var _this2 = this;
// ignore onChange, options

@@ -73,3 +72,5 @@ // eslint-disable-next-line no-unused-vars

return _react2.default.createElement('input', _extends({}, props, { defaultValue: defaultValue || value, ref: 'input' }));
return _react2.default.createElement('input', _extends({}, props, { defaultValue: defaultValue || value, ref: function ref(node) {
return _this2.node = node;
} }));
}

@@ -76,0 +77,0 @@ }]);

import React, { Component, PropTypes } from 'react'
import { findDOMNode } from 'react-dom'
import Flatpickr from 'flatpickr'

@@ -23,3 +22,2 @@

componentDidMount() {
const node = findDOMNode(this.refs.input)
const options = {

@@ -30,3 +28,3 @@ ...this.props.options,

this.flatpickr = new Flatpickr(node, options)
this.flatpickr = new Flatpickr(this.node, options)
}

@@ -39,3 +37,3 @@

return (
<input {...props} defaultValue={defaultValue || value} ref='input' />
<input {...props} defaultValue={defaultValue || value} ref={node => this.node = node} />
)

@@ -42,0 +40,0 @@ }

{
"name": "react-flatpickr",
"version": "2.0.1",
"version": "3.0.0",
"description": "flatpickr for React",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -28,2 +28,8 @@

* `flatpickr options`: you can pass all `flatpickr parameters` to `props.options`
```jsx
<Flatpickr options={{minDate: '2017-01-01'}} />
```
### License

@@ -30,0 +36,0 @@ MIT

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc