Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
}
}

:host([composited-layer]) {
will-change: transform;
}

@function get-trailing-text-input-padding($chevron-spacing) {
@return calc(var(--calcite-internal-date-picker-toggle-spacing) + $chevron-spacing);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import type { Input } from "../input/input";
import { useSetFocus } from "../../controllers/useSetFocus";
import { useInteractive } from "../../controllers/useInteractive";
import { useTopLayer } from "../../controllers/useTopLayer";
import { getUserAgentString } from "../../utils/browser";
import { styles } from "./input-date-picker.scss";
import { CSS, ICONS, IDS, POSITION } from "./resources";
import T9nStrings from "./assets/t9n/messages.en.json";
Expand Down Expand Up @@ -196,6 +197,11 @@ export class InputDatePicker

//#region Public Properties

/** When `range` is `true`, specifies the number of calendars displayed.
* @internal
*/
@property({ reflect: true }) compositedLayer = false;

/** When `range` is `true`, specifies the number of calendars displayed. */
@property({ type: Number, reflect: true }) calendars: 1 | 2 = 2;

Expand Down Expand Up @@ -470,6 +476,10 @@ export class InputDatePicker
}

async load(): Promise<void> {
// Workaround for Safari issue https://github.com/Esri/calcite-design-system/issues/13795
// ⚠️ browser-sniffing is not a best practice and should be avoided ⚠️
this.compositedLayer = /safari/i.test(getUserAgentString());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan 🪭 of browser sniffing 👃 🙅


this.handleDateTimeFormatChange();
await this.loadLocaleData();
this.onMinChanged(this.min);
Expand Down
Loading