Skip to content

Commit 95a0aeb

Browse files
committed
fix: passed date-fns locales instead of string in interface
1 parent ab31d93 commit 95a0aeb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/ui/src/components/Datepicker/DatepickerContext.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ import { createContext, useContext } from "react";
44
import type { FlowbiteDatepickerTheme } from "./Datepicker";
55
import type { Views, WeekStart } from "./helpers";
66

7+
// Define a type that represents the available locales
8+
type AvailableLocales = keyof typeof import("date-fns/locale");
9+
710
type DatepickerContextProps = {
811
theme: FlowbiteDatepickerTheme;
9-
language: string;
12+
language: AvailableLocales;
1013
weekStart: WeekStart;
1114
minDate?: Date;
1215
maxDate?: Date;

0 commit comments

Comments
 (0)