diff --git a/packages/bbui/src/helpers.js b/packages/bbui/src/helpers.js
index 4448527fea..78bd14fe13 100644
--- a/packages/bbui/src/helpers.js
+++ b/packages/bbui/src/helpers.js
@@ -179,6 +179,11 @@ export const stringifyDate = (
const day = `${value.date()}`.padStart(2, "0")
return `${year}-${month}-${day}T00:00:00.000`
}
+
+ // Otherwise use a normal ISO string with time and timezone
+ else {
+ return value.toISOString()
+ }
}
// Formats a dayjs date according to schema flags
diff --git a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte
index ed742530ba..51b520a4ea 100644
--- a/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte
+++ b/packages/frontend-core/src/components/grid/cells/HeaderCell.svelte
@@ -104,6 +104,7 @@
}
const onMouseDown = e => {
+ ui.actions.blur()
if ((e.touches?.length || e.button === 0) && orderable) {
timeout = setTimeout(() => {
reorder.actions.startReordering(column.name, e)
diff --git a/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte b/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte
index 3e2a3cf128..84d45dc3ed 100644
--- a/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte
+++ b/packages/frontend-core/src/components/grid/layout/NewColumnButton.svelte
@@ -3,10 +3,10 @@
import { Icon } from "@budibase/bbui"
import GridPopover from "../overlays/GridPopover.svelte"
- const { visibleColumns, scroll, width, subscribe } = getContext("grid")
+ const { visibleColumns, scroll, width, subscribe, ui } = getContext("grid")
let anchor
- let open = false
+ let isOpen = false
$: columnsWidth = $visibleColumns.reduce(
(total, col) => (total += col.width),
@@ -15,8 +15,13 @@
$: end = columnsWidth - 1 - $scroll.left
$: left = Math.min($width - 40, end)
+ const open = () => {
+ ui.actions.blur()
+ isOpen = true
+ }
+
const close = () => {
- open = false
+ isOpen = false
}
onMount(() => subscribe("close-edit-column", close))
@@ -29,11 +34,11 @@
bind:this={anchor}
class="add"
style="left:{left}px"
- on:click={() => (open = true)}
+ on:click={open}
>
-{#if open}
+{#if isOpen}
{
scroll,
bounds,
stickyColumn,
- ui,
maxScrollLeft,
width,
} = context
@@ -45,7 +44,6 @@ export const createActions = context => {
const $visibleColumns = get(visibleColumns)
const $bounds = get(bounds)
const $stickyColumn = get(stickyColumn)
- ui.actions.blur()
// Generate new breakpoints for the current columns
let breakpoints = $visibleColumns.map(col => ({