alchemy_cms 7.1.5 → 7.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96768643fc124e7d3faf032a61ec6b1cb2d737a5582f146990a63809f5f12814
4
- data.tar.gz: 8bc4f8f2d7c4416562ee1259601919f48867b91b4479130d24975c900ecc561b
3
+ metadata.gz: 317caab1ef8a6019ed85b61349817e4ae3f04db4a886442aa66a08ef24ea21d3
4
+ data.tar.gz: 5aa12003198319cabf9cb4c7a2daa4a83bece9b59ce886bcc1082f5f57e709e1
5
5
  SHA512:
6
- metadata.gz: 2b79394f97b700fa5e59fa242c50d9b296b3de5abcd8e35d483a609fc7d44329ab0e5cdc9d350f8e2891fea81a2f5627fe1a2a08436d1fb3f56ef3e22d209f08
7
- data.tar.gz: 5e018ef946f2185733751c6d2e4e62248ce2af578c2cefec7417932b1d8153522ec6f0c684451989291c6a1361a49193295e6c4ae1f3218fbe9c5398d76bb565
6
+ metadata.gz: 67ed51a034f0ce690906cfaa8a7d4d06d24184ef7402342c166d9ebcc84e0a3183c9bcc58be7fa8d66671e7e89a3738780cddc0ee97a38c3b4e072ce9454b204
7
+ data.tar.gz: 4af3eb0ecde2863da57720bf1da7cb63cb298dfcc4647de80b8999feadfe6e0c84dae67c7151f602d52c8d7ca686b52b49b4b1714f1a84e210e32dd77efdc667
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.1.6 (2024-03-05)
4
+
5
+ - [7.1-stable] Do not include timezone in datepickers only displaying date [#2768](https://github.com/AlchemyCMS/alchemy_cms/pull/2768) ([alchemycms-bot](https://github.com/alchemycms-bot))
6
+
3
7
  ## 7.1.5 (2024-02-29)
4
8
 
5
9
  - [7.1-stable] Fix taggable uniqueness in tags admin table [#2764](https://github.com/AlchemyCMS/alchemy_cms/pull/2764) ([alchemycms-bot](https://github.com/alchemycms-bot))
@@ -13,14 +13,25 @@ class Datepicker extends AlchemyHTMLElement {
13
13
  }
14
14
 
15
15
  afterRender() {
16
+ this.flatpickr = flatpickr(
17
+ this.getElementsByTagName("input")[0],
18
+ this.flatpickrOptions
19
+ )
20
+ }
21
+
22
+ disconnected() {
23
+ this.flatpickr.destroy()
24
+ }
25
+
26
+ get flatpickrOptions() {
27
+ const enableTime = /time/.test(this.inputType)
16
28
  const options = {
17
29
  // alchemy_i18n supports `zh_CN` etc., but flatpickr only has two-letter codes (`zh`)
18
30
  locale: currentLocale().slice(0, 2),
19
31
  altInput: true,
20
32
  altFormat: translate(`formats.${this.inputType}`),
21
33
  altInputClass: "flatpickr-input",
22
- dateFormat: "Z",
23
- enableTime: /time/.test(this.inputType),
34
+ enableTime,
24
35
  noCalendar: this.inputType === "time",
25
36
  time_24hr: translate("formats.time_24hr"),
26
37
  onValueUpdate(_selectedDates, _dateStr, instance) {
@@ -28,11 +39,11 @@ class Datepicker extends AlchemyHTMLElement {
28
39
  }
29
40
  }
30
41
 
31
- this.flatpickr = flatpickr(this.getElementsByTagName("input")[0], options)
32
- }
42
+ if (enableTime) {
43
+ options.dateFormat = "Z"
44
+ }
33
45
 
34
- disconnected() {
35
- this.flatpickr.destroy()
46
+ return options
36
47
  }
37
48
  }
38
49
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.1.5"
4
+ VERSION = "7.1.6"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.5
4
+ version: 7.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2024-02-29 00:00:00.000000000 Z
16
+ date: 2024-03-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer