Skip to content

Commit 4b4ea59

Browse files
committed
fix: datepicker type
1 parent 56d2a83 commit 4b4ea59

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

src/lib/datepicker/Datepicker.svelte

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
rangeFrom = $bindable(),
1414
rangeTo = $bindable(),
1515
locale = "default",
16-
firstDayOfWeek = 0, // 0 = Monday, 6 = Sunday
16+
firstDayOfWeek = 0,
1717
dateFormat = { year: "numeric", month: "long", day: "numeric" },
1818
placeholder = "Select date",
1919
disabled = false,
@@ -247,9 +247,4 @@
247247
{/if}
248248
</div>
249249

250-
<!--
251-
@component
252-
[Go to docs](https://flowbite-svelte-next.com/)
253-
## Props
254-
@props:
255-
-->
250+

src/lib/types.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -446,21 +446,21 @@ export type DateOrRange = Date | { from?: Date; to?: Date };
446446
export interface DatepickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onselect"> {
447447
value?: Date;
448448
defaultDate?: Date | null;
449-
range: boolean;
449+
range?: boolean;
450450
rangeFrom?: Date;
451451
rangeTo?: Date;
452-
locale: string;
453-
firstDayOfWeek: number;
454-
dateFormat: Intl.DateTimeFormatOptions;
455-
placeholder: string;
456-
disabled: boolean;
457-
required: boolean;
458-
inputClass: string;
459-
color: ButtonProps["color"];
460-
inline: boolean;
461-
autohide: boolean;
462-
showActionButtons: boolean;
463-
title: string;
452+
locale?: string;
453+
firstDayOfWeek?: number;
454+
dateFormat?: Intl.DateTimeFormatOptions;
455+
placeholder?: string;
456+
disabled?: boolean;
457+
required?: boolean;
458+
inputClass?: string;
459+
color?: ButtonProps["color"];
460+
inline?: boolean;
461+
autohide?: boolean;
462+
showActionButtons?: boolean;
463+
title?: string;
464464
onselect?: (x: DateOrRange) => void;
465465
onclear?: () => void;
466466
onapply?: (x: DateOrRange) => void;

src/routes/docs/typography/link.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ This example can be used to set a hyperlink on an image inside a card component.
129129
130130
<Card img="/images/image-1.webp" href="/cards">
131131
<div class="m-6">
132-
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Noteworthy technology acquisitions 2021</h5>
133-
<p class="mb-3 leading-tight font-normal text-gray-700 dark:text-gray-400">Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.</p>
134-
<Button>
135-
Read more <ArrowRightOutline class="ms-2 h-6 w-6" />
136-
</Button>
132+
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Noteworthy technology acquisitions 2021</h5>
133+
<p class="mb-3 leading-tight font-normal text-gray-700 dark:text-gray-400">Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.</p>
134+
<Button>
135+
Read more <ArrowRightOutline class="ms-2 h-6 w-6" />
136+
</Button>
137137
</div>
138138
</Card>
139139
```

0 commit comments

Comments
 (0)