Skip to content

Commit 43199af

Browse files
committed
fix: animation bug when enlarging day that is also present as outsider date of adjacent calendar page
1 parent fd7ea11 commit 43199af

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

src/lib/components/calendar/DayPicker.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
>
8282
<Grid template="repeat(6, 1fr) / repeat(7, 1fr)">
8383
{#each days as day, i (day)}
84-
{#if !$store.enlargeDay || !dayjs(day.date).isSame($store.selected, 'day')}
84+
{#if !$store.enlargeDay || index !== monthIndex || !dayjs(day.date).isSame($store.selected)}
8585
<a
8686
href="#pickday"
8787
on:keydown|preventDefault

src/lib/components/generic/InfiniteGrid.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
export const visibleData = derived(
2020
[dim, offset],
2121
([{ w, h }, $o]) => {
22-
if (!w || !h) return [];
22+
if (!w || !h || !intiailized) return [];
2323
const cellHeight = h / cellCount;
2424
const start = Math.max(-1, Math.floor((-1 * $o) / cellHeight) - 1);
2525
const baseOffset = $o % cellHeight;

src/lib/docs/NavBarItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const page = getContext('navbar');
77
const dispatch = createEventDispatcher();
88
9-
export let href;
9+
export let href = '';
1010
export let isActive = (path) => `${base}${path}` === href;
1111
1212
const click = (evt) => dispatch('click', evt);

src/routes/index.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
display: grid;
4949
grid-template: 1fr / 1fr;
5050
text-align: left;
51-
/* background: #0f0b0c; */
5251
background: var(--sc-theme-calendar-colors-background-highlight);
5352
margin: 0;
5453
grid-column: 1;

0 commit comments

Comments
 (0)