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

react-flatpickr

Package Overview
Dependencies
Maintainers
2
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 3.1.2 to 3.1.3

14

build/index.js

@@ -60,2 +60,6 @@ 'use strict';

this.flatpickr = new _flatpickr2.default(this.node, options);
if (this.props.hasOwnProperty('value')) {
this.flatpickr.setDate(this.props.value, false);
}
}

@@ -81,4 +85,5 @@ }, {

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

@@ -92,3 +97,6 @@ }

DateTimePicker.propTypes = {
options: _react.PropTypes.object
defaultValue: _react.PropTypes.string,
options: _react.PropTypes.object,
onChange: _react.PropTypes.func,
value: _react.PropTypes.string
};

@@ -95,0 +103,0 @@ DateTimePicker.defaultProps = {

@@ -6,5 +6,7 @@

class DateTimePicker extends Component {
static propTypes = {
defaultValue: PropTypes.string,
options: PropTypes.object,
onChange: PropTypes.func,
value: PropTypes.string
}

@@ -31,7 +33,11 @@

const options = {
...this.props.options,
onChange: this.props.onChange
...this.props.options,
onChange: this.props.onChange
}
this.flatpickr = new Flatpickr(this.node, options)
if (this.props.hasOwnProperty('value')) {
this.flatpickr.setDate(this.props.value, false)
}
}

@@ -48,3 +54,4 @@

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

@@ -51,0 +58,0 @@ }

{
"name": "react-flatpickr",
"version": "3.1.2",
"version": "3.1.3",
"description": "flatpickr for React",

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

"css-loader": "^0.26.1",
"eslint": "^3.14.1",
"eslint-config-bx-bsd": "^1.4.0",
"eslint-plugin-react": "^6.9.0",
"eslint-config-ok": "github:haoxins/eslint-config",
"react": "^15.4.2",

@@ -47,5 +45,5 @@ "react-dom": "^15.4.2",

"extends": [
"eslint-config-bx-bsd"
"ok"
]
}
}

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