Skip to content

fix(date-picker): end-range is now rounded and has the correct box-shadow #6216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 3 additions & 15 deletions src/components/date-picker-day/date-picker-day.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,11 @@
}
}

:host([start-of-range]:not(:focus)) {
:not(.calcite--rtl) {
.day {
box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
}
}
.calcite--rtl {
.day {
box-shadow: 0 0 0 -2px var(--calcite-ui-foreground-1);
}
}
}

:host([start-of-range]:not(:focus)),
:host([end-of-range]:not(:focus)) {
:not(.calcite--rtl) {
.day {
box-shadow: 0 0 0 -2px var(--calcite-ui-foreground-1);
box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
}
}
.calcite--rtl {
Expand Down Expand Up @@ -221,7 +209,7 @@
}

:host([highlighted]:not([active]:focus)) .day {
@apply text-color-1 rounded-none;
@apply text-color-1;
}

:host([range-hover]:not([selected])) {
Expand Down
16 changes: 5 additions & 11 deletions src/components/date-picker/date-picker.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,11 @@ export const range = (): string =>
)}
</div>`;

export const rangeRTL_TestOnly = (): string =>
html`<div style="width: 400px">
${create(
"calcite-date-picker",
createAttributes({ exceptions: ["min", "range", "dir"] }).concat([
{ name: "dir", value: "rtl" },
{ name: "min", value: "2016-08-09" },
{ name: "range", value: "true" }
])
)}
</div>`;
export const rangeRTL_TestOnly = (): string => html`
<div style="width: 400px">
<calcite-date-picker dir="rtl" range></calcite-date-picker>
</div>
`;

export const darkModeRTL_TestOnly = (): string =>
html`<div style="width: 400px">
Expand Down