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

react-persian-dates

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-persian-dates - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "react-persian-dates",
"version": "1.0.1",
"version": "1.0.2",
"description": "Persian Datepicker for React, NO \"moment.js\" NEEDED!",

@@ -5,0 +5,0 @@ "repository": {

@@ -8,22 +8,5 @@ import React, {Component} from 'react';

export default class Datepicker extends Component {
static defaultProps = {
selectFrom: new Date(),
startDate: new Date(),
type: 'persian',
monthsCount: 5,
}
static propTypes = {
onSelect: PropTypes.func
}
constructor(props) {
super(props);
let {selectFrom, selectTo, startDate, rangeSelect, type, monthsCount} = props;
if (rangeSelect) {
this.selectFrom = selectFrom;
this.selectTo = selectTo !== selectFrom ? selectTo : null;
} else {
this.selectFrom = this.selectTo = selectFrom;
}
const to = (rangeSelect && (selectTo !== selectFrom)) ? selectTo : selectFrom;

@@ -95,3 +78,3 @@ this.state = {

});
}
};

@@ -104,3 +87,3 @@ renderWeekdays = () => {

);
}
};

@@ -120,1 +103,12 @@ render() {

}
Datepicker.defaultProps = {
selectFrom: new Date(),
startDate: new Date(),
type: 'persian',
monthsCount: 5,
};
Datepicker.propTypes = {
onSelect: PropTypes.func
};

@@ -6,11 +6,2 @@ import React, {Component} from 'react';

class Day extends Component {
static defaultProps = {};
static propTypes = {
disabled: PropTypes.bool,
status: PropTypes.string,
persianDate: PropTypes.array,
onSelect: PropTypes.func,
};
render() {

@@ -53,2 +44,9 @@ const {disabled, status, date, persianDate, onSelect} = this.props;

Day.propTypes = {
disabled: PropTypes.bool,
status: PropTypes.string,
persianDate: PropTypes.array,
onSelect: PropTypes.func,
};
export default Day;

@@ -6,9 +6,2 @@ import React, {PureComponent} from 'react';

class Month extends PureComponent {
static propTypes = {
month: PropTypes.array,
monthTitle: PropTypes.string,
onSelect: PropTypes.func,
};
render() {

@@ -38,2 +31,8 @@ const { month, monthTitle, onSelect } = this.props;

Month.propTypes = {
month: PropTypes.array,
monthTitle: PropTypes.string,
onSelect: PropTypes.func,
};
export default Month;

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