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.35 to 2.1.36

20

dist/components/TimeInput.js

@@ -70,2 +70,3 @@ 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 hourRange = useMemo(() => hour12Format ? {

@@ -86,10 +87,13 @@ start: 1,

var setTimeHourString = useCallback(value => {
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");
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();
}

@@ -96,0 +100,0 @@ }, [hour12Format]);

2

package.json

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

],
"version": "2.1.35",
"version": "2.1.36",
"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