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

react-time-picker-input

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-time-picker-input - npm Package Compare versions

Comparing version 2.1.39 to 2.1.40

20

dist/components/TimeInput.js

@@ -63,3 +63,2 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var amPmRef = useRef(null);
var timeToUpdate = useRef(null);
var setHour = useCallback(function (newHour) {

@@ -98,13 +97,10 @@ var other = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

var setTimeHourString = useCallback(value => {
if (new Date().getTime() - (timeToUpdate === null || timeToUpdate === void 0 ? void 0 : timeToUpdate.current) >= 20) {
var _dateParts = getDatePartsByProps(value.replace(/ /g, ""), hour12Format);
setHour(_dateParts.hour);
setMinutes(_dateParts.minute);
setAmPM(_dateParts.amPm);
if (value.toLowerCase().includes("am")) {
setAmPM("AM");
} else if (value.toLowerCase().includes("pm")) {
setAmPM("PM");
}
timeToUpdate.current = new Date().getTime();
var dateParts = getDatePartsByProps(value.replace(/ /g, ""), hour12Format);
setHour(dateParts.hour);
setMinutes(dateParts.minute);
setAmPM(dateParts.amPm);
if (value.toLowerCase().includes("am")) {
setAmPM("AM");
} else if (value.toLowerCase().includes("pm")) {
setAmPM("PM");
}

@@ -111,0 +107,0 @@ }, [hour12Format]);

2

package.json

@@ -34,3 +34,3 @@ {

],
"version": "2.1.39",
"version": "2.1.40",
"private": false,

@@ -37,0 +37,0 @@ "main": "dist/index.js",

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