diff --git a/packages/bbui/src/Actions/click_outside.js b/packages/bbui/src/Actions/click_outside.js index eafca657f3..36af1398b1 100644 --- a/packages/bbui/src/Actions/click_outside.js +++ b/packages/bbui/src/Actions/click_outside.js @@ -1,5 +1,6 @@ const ignoredClasses = [ ".flatpickr-calendar", + ".spectrum-Calendar", ".spectrum-Popover", ".download-js-link", ] diff --git a/packages/bbui/src/Actions/position_dropdown.js b/packages/bbui/src/Actions/position_dropdown.js index 35ff4933d7..4929a9beaf 100644 --- a/packages/bbui/src/Actions/position_dropdown.js +++ b/packages/bbui/src/Actions/position_dropdown.js @@ -41,6 +41,8 @@ export default function positionDropdown(element, opts) { offset: opts.offset, }) } else { + const renderHeight = maxHeight || elementBounds.height + // Determine vertical styles const topSpace = anchorBounds.top const bottomSpace = window.innerHeight - anchorBounds.bottom @@ -52,11 +54,11 @@ export default function positionDropdown(element, opts) { styles.top = window.innerHeight - elementBounds.height } } else if ( - window.innerHeight - anchorBounds.bottom < (maxHeight || 100) && + window.innerHeight - anchorBounds.bottom < renderHeight + offset && topSpace - bottomSpace > 100 ) { - styles.top = anchorBounds.top - elementBounds.height - offset - styles.maxHeight = maxHeight || 240 + styles.top = anchorBounds.top - renderHeight - offset + styles.maxHeight = maxHeight } else { styles.top = anchorBounds.bottom + offset styles.maxHeight = diff --git a/packages/bbui/src/Form/Core/DatePicker/DateInput.svelte b/packages/bbui/src/Form/Core/DatePicker/DateInput.svelte index 653574c3e7..d3bb04a30b 100644 --- a/packages/bbui/src/Form/Core/DatePicker/DateInput.svelte +++ b/packages/bbui/src/Form/Core/DatePicker/DateInput.svelte @@ -3,12 +3,13 @@ export let anchor export let disabled + export let readonly export let error export let focused export let placeholder export let id export let value - export let icon = "Calendar" + export let icon export let enableTime export let timeOnly @@ -32,11 +33,11 @@