Socket
Socket
Sign inDemoInstall

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.3.4 to 8.3.5

14

dist/DateInput/Input.js

@@ -30,2 +30,3 @@ "use strict";

var isIEOrEdgeLegacy = typeof window !== 'undefined' && /(MSIE|Trident\/|Edge\/)/.test(window.navigator.userAgent);
var isFirefox = typeof window !== 'undefined' && /Firefox/.test(window.navigator.userAgent);

@@ -90,13 +91,16 @@ function onFocus(event) {

return function onKeyPress(event) {
if (isFirefox) {
// See https://github.com/wojtekmaj/react-time-picker/issues/92
return;
}
var key = event.key,
input = event.target;
var value = input.value;
var isNumberKey = !isNaN(parseInt(key, 10));
var isNumberKey = key.length === 1 && /\d/.test(key);
var selection = getSelectionString(input);
if (isNumberKey && (selection || value.length < maxLength)) {
return;
if (!isNumberKey || !(selection || value.length < maxLength)) {
event.preventDefault();
}
event.preventDefault();
};

@@ -103,0 +107,0 @@ }

@@ -0,0 +0,0 @@ declare module "react-date-picker/dist/entry.nostyle" {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -14,5 +14,7 @@ import { CalendarProps } from "react-calendar";

clearIcon?: JSX.Element | null;
closeCalendar?: boolean;
dayAriaLabel?: string;
dayPlaceholder?: string;
disabled?: boolean;
disableCalendar?: boolean;
format?: string;

@@ -19,0 +21,0 @@ isOpen?: boolean;

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

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

},
"funding": "https://github.com/wojtekmaj/react-date-picker?sponsor=1"
"funding": "https://github.com/wojtekmaj/react-date-picker?sponsor=1",
"packageManager": "yarn@3.1.0"
}

@@ -1,2 +0,2 @@

[![npm](https://img.shields.io/npm/v/react-date-picker.svg)](https://www.npmjs.com/package/react-date-picker) ![downloads](https://img.shields.io/npm/dt/react-date-picker.svg) [![CI](https://github.com/wojtekmaj/react-date-picker/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-date-picker/actions) ![dependencies](https://img.shields.io/david/wojtekmaj/react-date-picker.svg) ![dev dependencies](https://img.shields.io/david/dev/wojtekmaj/react-date-picker.svg) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![npm](https://img.shields.io/npm/v/react-date-picker.svg)](https://www.npmjs.com/package/react-date-picker) ![downloads](https://img.shields.io/npm/dt/react-date-picker.svg) [![CI](https://github.com/wojtekmaj/react-date-picker/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-date-picker/actions) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

@@ -3,0 +3,0 @@ # React-Date-Picker

@@ -0,0 +0,0 @@ import React from 'react';

@@ -16,2 +16,7 @@ import React from 'react';

const isFirefox = (
typeof window !== 'undefined'
&& /Firefox/.test(window.navigator.userAgent)
);
function onFocus(event) {

@@ -73,13 +78,16 @@ const { target } = event;

return function onKeyPress(event) {
if (isFirefox) {
// See https://github.com/wojtekmaj/react-time-picker/issues/92
return;
}
const { key, target: input } = event;
const { value } = input;
const isNumberKey = !isNaN(parseInt(key, 10));
const isNumberKey = key.length === 1 && /\d/.test(key);
const selection = getSelectionString(input);
if (isNumberKey && (selection || value.length < maxLength)) {
return;
if (!isNumberKey || !(selection || value.length < maxLength)) {
event.preventDefault();
}
event.preventDefault();
};

@@ -86,0 +94,0 @@ }

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import 'react-calendar/dist/Calendar.css';

import DatePicker from './DatePicker';
export default DatePicker;

@@ -0,0 +0,0 @@ import getUserLocale from 'get-user-locale';

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ import {

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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