We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 615c5b6 commit ffa2274Copy full SHA for ffa2274
packages/flowbite-theme/src/lib/widgets/text-widget.svelte
@@ -5,9 +5,14 @@
5
6
let { value = $bindable(), attributes }: WidgetProps<'text'> = $props();
7
8
+ function parseLocalDate(date: string) {
9
+ const [year, month, day] = date.split('-').map(Number);
10
+ return new Date(year, month - 1, day);
11
+ }
12
+
13
const date = {
14
get value() {
- return value ? new Date(value) : null;
15
+ return value ? parseLocalDate(value) : null;
16
},
17
set value(v) {
18
if (attributes.readonly) {
0 commit comments