playbook_ui 12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617 → 12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628

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: 102bb0a97a693903b5529db165bc9e772618418347aeeda1bf999c0efdc46121
4
- data.tar.gz: be8f83ba5c73d4d513039e483dd9b0d83eeb30d6b4462da6dcb8542915ee66dc
3
+ metadata.gz: c999abe9c5d5963b06cceb1667a63267dcf9d1633e6ece0834a87e501a0d8880
4
+ data.tar.gz: 6c174d014f46fb6eb7f30f49ac13a9e32955f233bb9c7143da06c06adc42ca72
5
5
  SHA512:
6
- metadata.gz: fbf7ffb2694dc1c932df32a956002fd388c55aa8ee6fb2fe5e38d3f909b81c4f6b65a06a5cc8fee481437ed5c7af553a43b8b4d2aba38e0a03c7c7cf5b4bdd24
7
- data.tar.gz: b178df679610fca701110d377a3e03f308d3fdbde8836d163dbac07d4dc2e6afb219b2f0603c0983558a19aee8f80b41156dec7bf749600c96173078dcef8cfb
6
+ metadata.gz: 11808e3612de95f609ae0355d3bff322fdb8972ae3a8f564868be47d0bf29d310e65ca447d125a3f4c0da57456f58d5a27558290f668dec514327f1a5aabb6c7
7
+ data.tar.gz: e0ceb2f1e3c86e36d7cf3a31d2dfd98e60dd924fa83ce992ef26911244a38dd0ef068f5abebf00e54452588155b55c817b43f43ff8f8f378e19a75896c9bec3e
@@ -60,8 +60,23 @@
60
60
  </div>
61
61
 
62
62
  <%= javascript_tag do %>
63
- window.addEventListener("DOMContentLoaded", () => {
64
- datePickerHelper(<%= object.date_picker_config %>, "<%= object.scroll_container %>")
63
+ window.addEventListener("DOMContentLoaded", (event) => {
64
+ datePickerHelper(<%= object.date_picker_config %>, "<%= object.scroll_container %>")
65
+ event.preventDefault();
66
+ const variantArr = document.querySelectorAll('#cal-icon-<%= object.picker_id %>')
67
+ if (!variantArr) {
68
+ setTimeout(attachIconClickHandler, 100);
69
+ return;
70
+ }
71
+
72
+ const instance = document.querySelector('#<%= object.picker_id %>')._flatpickr
73
+ variantArr.forEach(icon => {
74
+ icon.addEventListener("click", function(event) {
75
+ event.preventDefault();
76
+ instance.open()
77
+ });
78
+ });
65
79
  })
80
+
66
81
  <% end %>
67
82
  <% end %>
@@ -148,12 +148,12 @@ const quickPickPlugin = () => {
148
148
  selectActiveRangeButton(selectedDates);
149
149
  },
150
150
 
151
- onClose(selectedDates: Array<string>) {
152
- // set the input value to the selected dates when the dropdown is closed
153
- if (!selectedDates[1]) {
154
- fp.input.value = fp.formatDate(this.selectedDates[0], fp.config.dateFormat) + ' → ' + fp.formatDate(this.selectedDates[1], fp.config.dateFormat);
155
- }
156
- }
151
+ // onClose(selectedDates: Array<string>) {
152
+ // // set the input value to the selected dates when the dropdown is closed
153
+ // // if (!selectedDates[1]) {
154
+ // // fp.input.value = fp.formatDate(this.selectedDates[0], fp.config.dateFormat) + ' → ' + fp.formatDate(this.selectedDates[1], fp.config.dateFormat);
155
+ // // }
156
+ // }
157
157
  };
158
158
  };
159
159
  }
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "12.18.0"
5
- VERSION = "12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617"
5
+ VERSION = "12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617
4
+ version: 12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-05 00:00:00.000000000 Z
12
+ date: 2023-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack