react-persian-calendar-date-picker
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -57,3 +57,2 @@ "use strict"; | ||
var dateInputElement = (0, _react.useRef)(null); | ||
var datePickerElement = (0, _react.useRef)(null); | ||
@@ -94,4 +93,4 @@ var _useState = (0, _react.useState)(false), | ||
e.persist(); | ||
if (!isCalendarOpen) return; | ||
var calendar = calendarContainerElement.current; | ||
if (!calendar) return; | ||
var calendarPosition = calendar.getBoundingClientRect(); | ||
@@ -133,4 +132,6 @@ | ||
if (!calendarContainerElement.current) return; | ||
var isVisible = datePickerElement.current.classList.contains('-calendarOpen'); | ||
if (isVisible) return {}; | ||
var previousLeft = calendarContainerElement.current.style.left; | ||
if (previousLeft) return { | ||
left: previousLeft | ||
}; | ||
@@ -154,3 +155,2 @@ var _calendarContainerEle = calendarContainerElement.current.getBoundingClientRect(), | ||
return _react["default"].createElement("div", { | ||
ref: datePickerElement, | ||
className: "DatePicker ".concat(isCalendarOpen ? '-calendarOpen' : '', " ").concat(wrapperClassName) | ||
@@ -157,0 +157,0 @@ }, _react["default"].createElement("div", { |
{ | ||
"name": "react-persian-calendar-date-picker", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A lightweight, customizable, Persian date picker for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
55578
1317