hamzus-ui 0.0.167 → 0.0.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -53,6 +53,23 @@
|
|
|
53
53
|
let hour = ""
|
|
54
54
|
let min = ""
|
|
55
55
|
|
|
56
|
+
onMount(()=>{
|
|
57
|
+
if (value === "") return
|
|
58
|
+
|
|
59
|
+
const dateTimeData = value.split(" ");
|
|
60
|
+
|
|
61
|
+
const dateData = dateTimeData[0].split('-');
|
|
62
|
+
|
|
63
|
+
const day = parseInt(dateData[2]);
|
|
64
|
+
currentMonth = parseInt(dateData[1]);
|
|
65
|
+
currentYear = parseInt(dateData[0]);
|
|
66
|
+
|
|
67
|
+
selectedMonth = currentMonth
|
|
68
|
+
selectedYear = currentYear
|
|
69
|
+
|
|
70
|
+
handleUpdateValue(day)
|
|
71
|
+
})
|
|
72
|
+
|
|
56
73
|
function getYearList(startYear = 1997) {
|
|
57
74
|
const currentYear = new Date().getFullYear();
|
|
58
75
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import ScrollArea from '../ScrollArea/ScrollArea.svelte';
|
|
3
3
|
import Button from '../Button/Button.svelte';
|
|
4
4
|
import * as DropdownMenu from '../DropdownMenu';
|
|
5
|
+
import { onMount } from 'svelte';
|
|
5
6
|
|
|
6
7
|
export let name = '';
|
|
7
8
|
export let label = '';
|
|
@@ -15,6 +16,12 @@
|
|
|
15
16
|
|
|
16
17
|
const yearList = getYearList();
|
|
17
18
|
|
|
19
|
+
onMount(()=>{
|
|
20
|
+
if (value === "") return
|
|
21
|
+
|
|
22
|
+
handleSelectYear(value)
|
|
23
|
+
})
|
|
24
|
+
|
|
18
25
|
function getYearList(startYear = 1997) {
|
|
19
26
|
const currentYear = new Date().getFullYear();
|
|
20
27
|
return Array.from({ length: currentYear - startYear + 1 }, (_, i) => currentYear - i);
|