react-time-picker-input
Advanced tools
Comparing version 2.1.39 to 2.1.40
@@ -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]); |
@@ -34,3 +34,3 @@ { | ||
], | ||
"version": "2.1.39", | ||
"version": "2.1.40", | ||
"private": false, | ||
@@ -37,0 +37,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60244
1100