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

react-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-date-picker - npm Package Compare versions

Comparing version 8.0.6 to 8.0.7

18

dist/DateInput.js

@@ -86,3 +86,5 @@ "use strict";

var defaultMinDate = new Date('0001-01-01');
var defaultMinDate = new Date();
defaultMinDate.setFullYear(1, 0, 1);
defaultMinDate.setHours(0, 0, 0, 0);
var defaultMaxDate = new Date(8.64e15);

@@ -92,2 +94,10 @@ var allViews = ['century', 'decade', 'year', 'month'];

function toDate(value) {
if (value instanceof Date) {
return value;
}
return new Date(value);
}
function datesAreDifferent(date1, date2) {

@@ -110,3 +120,3 @@ return date1 && !date2 || !date1 && date2 || date1 && date2 && date1.getTime() !== date2.getTime();

var rawValue = value instanceof Array && value.length === 2 ? value[index] : value;
var rawValue = Array.isArray(value) && value.length === 2 ? value[index] : value;

@@ -117,3 +127,3 @@ if (!rawValue) {

var valueDate = new Date(rawValue);
var valueDate = toDate(rawValue);

@@ -154,3 +164,3 @@ if (isNaN(valueDate.getTime())) {

if (value instanceof Array) {
if (Array.isArray(value)) {
return value;

@@ -157,0 +167,0 @@ }

{
"name": "react-date-picker",
"version": "8.0.6",
"version": "8.0.7",
"description": "A date picker for your React app.",

@@ -81,3 +81,3 @@ "main": "dist/entry.js",

"prop-types": "^15.6.0",
"react-calendar": "^3.0.0",
"react-calendar": "^3.3.1",
"react-fit": "^1.0.3",

@@ -84,0 +84,0 @@ "update-input-width": "^1.1.1"

@@ -20,3 +20,5 @@ import React, { PureComponent } from 'react';

const defaultMinDate = new Date('0001-01-01');
const defaultMinDate = new Date();
defaultMinDate.setFullYear(1, 0, 1);
defaultMinDate.setHours(0, 0, 0, 0);
const defaultMaxDate = new Date(8.64e15);

@@ -26,2 +28,10 @@ const allViews = ['century', 'decade', 'year', 'month'];

function toDate(value) {
if (value instanceof Date) {
return value;
}
return new Date(value);
}
function datesAreDifferent(date1, date2) {

@@ -47,3 +57,3 @@ return (

const rawValue = value instanceof Array && value.length === 2 ? value[index] : value;
const rawValue = Array.isArray(value) && value.length === 2 ? value[index] : value;

@@ -54,3 +64,3 @@ if (!rawValue) {

const valueDate = new Date(rawValue);
const valueDate = toDate(rawValue);

@@ -86,3 +96,3 @@ if (isNaN(valueDate.getTime())) {

if (value instanceof Array) {
if (Array.isArray(value)) {
return value;

@@ -89,0 +99,0 @@ }

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