@budibase/bbui 2.27.2 → 2.27.3
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.
- package/dist/bbui.es.js +1 -1
- package/dist/bbui.es.js.map +1 -1
- package/package.json +4 -4
- package/src/helpers.js +7 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "2.27.
|
|
4
|
+
"version": "2.27.3",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
|
38
|
-
"@budibase/shared-core": "2.27.
|
|
39
|
-
"@budibase/string-templates": "2.27.
|
|
38
|
+
"@budibase/shared-core": "2.27.3",
|
|
39
|
+
"@budibase/string-templates": "2.27.3",
|
|
40
40
|
"@spectrum-css/accordion": "3.0.24",
|
|
41
41
|
"@spectrum-css/actionbutton": "1.0.1",
|
|
42
42
|
"@spectrum-css/actiongroup": "1.0.1",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "7edd7b2ee3284719cd17f7004a17f4ed5d818c65"
|
|
107
107
|
}
|
package/src/helpers.js
CHANGED
|
@@ -168,7 +168,12 @@ export const stringifyDate = (
|
|
|
168
168
|
// Ensure we use the correct offset for the date
|
|
169
169
|
const referenceDate = value.toDate()
|
|
170
170
|
const offset = referenceDate.getTimezoneOffset() * 60000
|
|
171
|
-
|
|
171
|
+
const date = new Date(value.valueOf() - offset)
|
|
172
|
+
if (timeOnly) {
|
|
173
|
+
// Extract HH:mm
|
|
174
|
+
return date.toISOString().slice(11, 16)
|
|
175
|
+
}
|
|
176
|
+
return date.toISOString().slice(0, -1)
|
|
172
177
|
}
|
|
173
178
|
|
|
174
179
|
// For date-only fields, construct a manual timestamp string without a time
|
|
@@ -177,7 +182,7 @@ export const stringifyDate = (
|
|
|
177
182
|
const year = value.year()
|
|
178
183
|
const month = `${value.month() + 1}`.padStart(2, "0")
|
|
179
184
|
const day = `${value.date()}`.padStart(2, "0")
|
|
180
|
-
return `${year}-${month}-${day}
|
|
185
|
+
return `${year}-${month}-${day}`
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
// Otherwise use a normal ISO string with time and timezone
|