flatpickr 4.6.10.0 → 4.6.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70d6de393aaa727a6cbaa2a81a1176079bda538c0dfb1305032cb917293cf995
4
- data.tar.gz: 2795da991bbf422ebf201e31b70efae19c264679d77cce4f816a8ba63f0535e7
3
+ metadata.gz: cfbeea2ac5bbad5de4e69cabcab1bb01d673d94888033d5c7d87a302e11cb2ba
4
+ data.tar.gz: 5e53786616a17d6c545a52941178751f0e4dde61c6c7997fdd83ae8744356321
5
5
  SHA512:
6
- metadata.gz: 1157b71c92e9b8a897c432d3df5e77ab72d4c98e95c45dd053e0af2dc0bd72b2b0abb7337df7298cbc0054db3fcd38f20e1f513bb0513d3bfd75a305a841cf94
7
- data.tar.gz: 9bbe7dd7aeb201f4fcbcbc171e0ed2d1b5e61381008b0149ea8aa31b0c1e4fa9c8178fa4df8e7fd070c98707fcdc68334738cf42d930c6c5298d12733514ba61
6
+ metadata.gz: 7b7957dde4644d470c51a4785009e64c1acc9497da890ff34eb016b5ee19da7cee644ea7b8be02ae2c750a17311d1f8b48507ce846c5d43fafc67e88a664f00a
7
+ data.tar.gz: a151ec2ad2b5ee8e4cea96738d1ac41710e6dfb816abbbb021837891583f42cd0cbe4077254bad7a9a1c03cc13cc3fa2934e195b3d2b00433fc7730509bf4bd3
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flatpickr
4
- VERSION = '4.6.10.0'
4
+ VERSION = '4.6.11.0'
5
5
  end
data/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "flatpickr": "^4.6.10"
3
+ "flatpickr": "^4.6.11"
4
4
  }
5
5
  }
@@ -1,4 +1,4 @@
1
- /* flatpickr v4.6.10, @license MIT */
1
+ /* flatpickr v4.6.11, @license MIT */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -715,17 +715,10 @@
715
715
  if (e !== undefined && e.type !== "blur") {
716
716
  timeWrapper(e);
717
717
  }
718
- var valueFromInput = self._input.value;
719
- var dateFromInput = self.parseDate(valueFromInput);
720
- var latestDate = self.latestSelectedDateObj;
721
- if (valueFromInput && latestDate && (dateFromInput === null || dateFromInput === void 0 ? void 0 : dateFromInput.getTime()) !== (latestDate === null || latestDate === void 0 ? void 0 : latestDate.getTime())) {
722
- setDate(dateFromInput);
723
- }
724
- else {
725
- setHoursFromInputs();
726
- }
718
+ var prevValue = self._input.value;
719
+ setHoursFromInputs();
727
720
  updateValue();
728
- if (self._input.value !== valueFromInput) {
721
+ if (self._input.value !== prevValue) {
729
722
  self._debouncedChange();
730
723
  }
731
724
  }
@@ -807,7 +800,7 @@
807
800
  */
808
801
  function setHoursFromDate(dateObj) {
809
802
  var date = dateObj || self.latestSelectedDateObj;
810
- if (date) {
803
+ if (date && date instanceof Date) {
811
804
  setHours(date.getHours(), date.getMinutes(), date.getSeconds());
812
805
  }
813
806
  }
@@ -1561,19 +1554,15 @@
1561
1554
  e.path.indexOf &&
1562
1555
  (~e.path.indexOf(self.input) ||
1563
1556
  ~e.path.indexOf(self.altInput)));
1564
- var lostFocus = e.type === "blur"
1565
- ? isInput &&
1566
- e.relatedTarget &&
1567
- !isCalendarElem(e.relatedTarget)
1568
- : !isInput &&
1569
- !isCalendarElement &&
1570
- !isCalendarElem(e.relatedTarget);
1557
+ var lostFocus = !isInput &&
1558
+ !isCalendarElement &&
1559
+ !isCalendarElem(e.relatedTarget);
1571
1560
  var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {
1572
1561
  return elem.contains(eventTarget_1);
1573
1562
  });
1574
1563
  if (lostFocus && isIgnored) {
1575
1564
  if (self.config.allowInput) {
1576
- self.setDate(self._input.value, true, self.config.altInput
1565
+ self.setDate(self._input.value, false, self.config.altInput
1577
1566
  ? self.config.altFormat
1578
1567
  : self.config.dateFormat);
1579
1568
  }
@@ -2516,7 +2505,8 @@
2516
2505
  }
2517
2506
  function isDateSelected(date) {
2518
2507
  for (var i = 0; i < self.selectedDates.length; i++) {
2519
- if (compareDates(self.selectedDates[i], date) === 0)
2508
+ var selectedDate = self.selectedDates[i];
2509
+ if (selectedDate instanceof Date && compareDates(selectedDate, date) === 0)
2520
2510
  return "" + i;
2521
2511
  }
2522
2512
  return false;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flatpickr
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.10.0
4
+ version: 4.6.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoran