@f1softinternational/f1-nepali-date-picker 1.0.0 → 1.0.2
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/README.md +1 -1
- package/esm2022/lib/components/nepali-date-picker/nepali-date-picker.component.mjs +30 -3
- package/esm2022/lib/utils/bs-calendar-data.mjs +150 -15
- package/fesm2022/f1softinternational-f1-nepali-date-picker.mjs +177 -16
- package/fesm2022/f1softinternational-f1-nepali-date-picker.mjs.map +1 -1
- package/lib/components/nepali-date-picker/nepali-date-picker.component.d.ts +11 -2
- package/lib/utils/bs-calendar-data.d.ts +3 -2
- package/package.json +1 -1
|
@@ -8,18 +8,44 @@ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
|
8
8
|
/**
|
|
9
9
|
* Bikram Sambat Calendar Data
|
|
10
10
|
* Contains month days mapping for each BS year and localization strings
|
|
11
|
+
* Extended data sourced from: https://github.com/techgaun/ad-bs-converter
|
|
11
12
|
*/
|
|
12
13
|
/**
|
|
13
14
|
* BS Year to Month Days Mapping
|
|
14
15
|
* Each entry: [year]: [days in each month from Baisakh to Chaitra]
|
|
15
|
-
* Data range:
|
|
16
|
+
* Data range: 1975 BS to 2199 BS
|
|
16
17
|
*/
|
|
17
18
|
const BS_CALENDAR_DATA = {
|
|
19
|
+
1975: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
20
|
+
1976: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
21
|
+
1977: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
22
|
+
1978: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
23
|
+
1979: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
24
|
+
1980: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
25
|
+
1981: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
26
|
+
1982: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
27
|
+
1983: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
28
|
+
1984: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
29
|
+
1985: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
30
|
+
1986: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
31
|
+
1987: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
32
|
+
1988: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
33
|
+
1989: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
34
|
+
1990: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
35
|
+
1991: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
36
|
+
1992: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
37
|
+
1993: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
38
|
+
1994: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
39
|
+
1995: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
40
|
+
1996: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
41
|
+
1997: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
42
|
+
1998: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
43
|
+
1999: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
18
44
|
2000: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
19
45
|
2001: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
20
46
|
2002: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
21
47
|
2003: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
22
|
-
2004: [30, 32, 31, 32, 31, 30, 30, 30,
|
|
48
|
+
2004: [30, 32, 31, 32, 31, 30, 30, 30, 30, 29, 29, 31],
|
|
23
49
|
2005: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
24
50
|
2006: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
25
51
|
2007: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
@@ -77,7 +103,7 @@ const BS_CALENDAR_DATA = {
|
|
|
77
103
|
2059: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
78
104
|
2060: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
79
105
|
2061: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
80
|
-
2062: [
|
|
106
|
+
2062: [31, 31, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31],
|
|
81
107
|
2063: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
82
108
|
2064: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
83
109
|
2065: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
@@ -96,26 +122,135 @@ const BS_CALENDAR_DATA = {
|
|
|
96
122
|
2078: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
97
123
|
2079: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
98
124
|
2080: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
99
|
-
2081: [31,
|
|
100
|
-
2082: [
|
|
125
|
+
2081: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
126
|
+
2082: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
101
127
|
2083: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
102
128
|
2084: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
103
129
|
2085: [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
|
104
130
|
2086: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
105
|
-
2087: [31, 31, 32, 31, 31, 31, 30,
|
|
131
|
+
2087: [31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30],
|
|
106
132
|
2088: [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
|
107
133
|
2089: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
108
134
|
2090: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
135
|
+
2091: [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30],
|
|
136
|
+
2092: [30, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
137
|
+
2093: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
138
|
+
2094: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
139
|
+
2095: [31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30],
|
|
140
|
+
2096: [30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
141
|
+
2097: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
142
|
+
2098: [31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 29, 31],
|
|
143
|
+
2099: [31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30],
|
|
144
|
+
2100: [31, 32, 31, 32, 30, 31, 30, 29, 30, 29, 30, 30],
|
|
145
|
+
2101: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
146
|
+
2102: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
147
|
+
2103: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
148
|
+
2104: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
149
|
+
2105: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
150
|
+
2106: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
151
|
+
2107: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
152
|
+
2108: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
153
|
+
2109: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
154
|
+
2110: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
155
|
+
2111: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
156
|
+
2112: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
157
|
+
2113: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
158
|
+
2114: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],
|
|
159
|
+
2115: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
160
|
+
2116: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
161
|
+
2117: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
162
|
+
2118: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
163
|
+
2119: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
164
|
+
2120: [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],
|
|
165
|
+
2121: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
166
|
+
2122: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
167
|
+
2123: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
168
|
+
2124: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
169
|
+
2125: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
170
|
+
2126: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
171
|
+
2127: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
172
|
+
2128: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
173
|
+
2129: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
174
|
+
2130: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
175
|
+
2131: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
176
|
+
2132: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
177
|
+
2133: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
178
|
+
2134: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
179
|
+
2135: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
180
|
+
2136: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
181
|
+
2137: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
182
|
+
2138: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
183
|
+
2139: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 31],
|
|
184
|
+
2140: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
185
|
+
2141: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],
|
|
186
|
+
2142: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
187
|
+
2143: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
188
|
+
2144: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
189
|
+
2145: [31, 31, 32, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
190
|
+
2146: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
191
|
+
2147: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
192
|
+
2148: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
193
|
+
2149: [31, 31, 32, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
194
|
+
2150: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
195
|
+
2151: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
196
|
+
2152: [31, 31, 32, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
197
|
+
2153: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
198
|
+
2154: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
199
|
+
2155: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
200
|
+
2156: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
201
|
+
2157: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
202
|
+
2158: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
203
|
+
2159: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
204
|
+
2160: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
205
|
+
2161: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
206
|
+
2162: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
207
|
+
2163: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
208
|
+
2164: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
209
|
+
2165: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
210
|
+
2166: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
211
|
+
2167: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
212
|
+
2168: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
213
|
+
2169: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
214
|
+
2170: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
215
|
+
2171: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
216
|
+
2172: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
217
|
+
2173: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
218
|
+
2174: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
219
|
+
2175: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
220
|
+
2176: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
221
|
+
2177: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
222
|
+
2178: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
223
|
+
2179: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
224
|
+
2180: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
225
|
+
2181: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
226
|
+
2182: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
227
|
+
2183: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
228
|
+
2184: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
229
|
+
2185: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
230
|
+
2186: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
231
|
+
2187: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
232
|
+
2188: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
233
|
+
2189: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
234
|
+
2190: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
235
|
+
2191: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
236
|
+
2192: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
237
|
+
2193: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
238
|
+
2194: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
239
|
+
2195: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
240
|
+
2196: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
241
|
+
2197: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
242
|
+
2198: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
243
|
+
2199: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],
|
|
109
244
|
};
|
|
110
245
|
/**
|
|
111
246
|
* Nepali month names
|
|
112
247
|
*/
|
|
113
248
|
const BS_MONTHS_NP = [
|
|
114
249
|
'बैशाख',
|
|
115
|
-
'
|
|
116
|
-
'
|
|
250
|
+
'जेष्ठ',
|
|
251
|
+
'आषाढ',
|
|
117
252
|
'श्रावण',
|
|
118
|
-
'
|
|
253
|
+
'भाद्र',
|
|
119
254
|
'आश्विन',
|
|
120
255
|
'कार्तिक',
|
|
121
256
|
'मंसिर',
|
|
@@ -130,13 +265,13 @@ const BS_MONTHS_NP = [
|
|
|
130
265
|
const BS_MONTHS_EN = [
|
|
131
266
|
'Baisakh',
|
|
132
267
|
'Jestha',
|
|
133
|
-
'
|
|
268
|
+
'Ashadh',
|
|
134
269
|
'Shrawan',
|
|
135
270
|
'Bhadra',
|
|
136
271
|
'Ashwin',
|
|
137
272
|
'Kartik',
|
|
138
273
|
'Mangsir',
|
|
139
|
-
'
|
|
274
|
+
'Paush',
|
|
140
275
|
'Magh',
|
|
141
276
|
'Falgun',
|
|
142
277
|
'Chaitra',
|
|
@@ -155,14 +290,14 @@ const BS_WEEKDAYS_EN = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
|
155
290
|
const NEPALI_DIGITS = ['०', '१', '२', '३', '४', '५', '६', '७', '८', '९'];
|
|
156
291
|
/**
|
|
157
292
|
* Reference date for conversion calculations
|
|
158
|
-
* BS:
|
|
293
|
+
* BS: 1975-01-01 corresponds to AD: 1918-04-13
|
|
159
294
|
*/
|
|
160
295
|
const BS_EPOCH = {
|
|
161
|
-
year:
|
|
296
|
+
year: 1975,
|
|
162
297
|
month: 1,
|
|
163
298
|
day: 1,
|
|
164
299
|
};
|
|
165
|
-
const AD_EPOCH = new Date(
|
|
300
|
+
const AD_EPOCH = new Date(1918, 3, 13); // April 13, 1918
|
|
166
301
|
/**
|
|
167
302
|
* Get minimum supported BS year
|
|
168
303
|
*/
|
|
@@ -655,6 +790,18 @@ class NepaliDatePickerComponent {
|
|
|
655
790
|
this.updateCalendarGrid();
|
|
656
791
|
}
|
|
657
792
|
ngOnDestroy() { }
|
|
793
|
+
ngOnChanges(changes) {
|
|
794
|
+
// Update month/weekday names when language changes
|
|
795
|
+
if (changes['language'] && !changes['language'].firstChange) {
|
|
796
|
+
this.monthNames = this.dateConverter.getMonthNames(this.language);
|
|
797
|
+
this.weekdayNames = this.dateConverter.getWeekdayNames(this.language);
|
|
798
|
+
this.cdr.markForCheck();
|
|
799
|
+
}
|
|
800
|
+
// Trigger change detection when useNepaliDigits changes
|
|
801
|
+
if (changes['useNepaliDigits'] && !changes['useNepaliDigits'].firstChange) {
|
|
802
|
+
this.cdr.markForCheck();
|
|
803
|
+
}
|
|
804
|
+
}
|
|
658
805
|
// ControlValueAccessor implementation
|
|
659
806
|
writeValue(value) {
|
|
660
807
|
this.selectedDate = value;
|
|
@@ -795,6 +942,20 @@ class NepaliDatePickerComponent {
|
|
|
795
942
|
trackByDay(index) {
|
|
796
943
|
return index;
|
|
797
944
|
}
|
|
945
|
+
/**
|
|
946
|
+
* Format day number based on useNepaliDigits setting
|
|
947
|
+
*/
|
|
948
|
+
formatDay(day) {
|
|
949
|
+
if (day === null)
|
|
950
|
+
return '';
|
|
951
|
+
return this.useNepaliDigits ? toNepaliDigits(day) : String(day);
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Format year number based on useNepaliDigits setting
|
|
955
|
+
*/
|
|
956
|
+
formatYear(year) {
|
|
957
|
+
return this.useNepaliDigits ? toNepaliDigits(year) : String(year);
|
|
958
|
+
}
|
|
798
959
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NepaliDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: DateConverterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
799
960
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NepaliDatePickerComponent, isStandalone: true, selector: "f1-nepali-date-picker", inputs: { minDate: "minDate", maxDate: "maxDate", placeholder: "placeholder", displayFormat: "displayFormat", theme: "theme", language: "language", showTodayButton: "showTodayButton", disabled: "disabled", useNepaliDigits: "useNepaliDigits" }, outputs: { dateChange: "dateChange" }, host: { listeners: { "document:click": "onClickOutside($event)", "document:keydown.escape": "onEscapeKey()" } }, providers: [
|
|
800
961
|
{
|
|
@@ -802,7 +963,7 @@ class NepaliDatePickerComponent {
|
|
|
802
963
|
useExisting: forwardRef(() => NepaliDatePickerComponent),
|
|
803
964
|
multi: true,
|
|
804
965
|
},
|
|
805
|
-
], ngImport: i0, template: "<div class=\"f1-datepicker\" [class.f1-datepicker--dark]=\"theme === 'dark'\" [class.f1-datepicker--disabled]=\"disabled\">\n <!-- Input Field -->\n <div class=\"f1-datepicker__input-wrapper\" (click)=\"toggleCalendar()\">\n <input\n type=\"text\"\n class=\"f1-datepicker__input\"\n [value]=\"displayValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n readonly\n />\n <span class=\"f1-datepicker__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </svg>\n </span>\n <button\n *ngIf=\"selectedDate && !disabled\"\n type=\"button\"\n class=\"f1-datepicker__clear\"\n (click)=\"clearDate(); $event.stopPropagation()\"\n aria-label=\"Clear date\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <!-- Calendar Dropdown -->\n <div class=\"f1-datepicker__dropdown\" *ngIf=\"isOpen\" [@fadeIn]>\n <!-- Header -->\n <div class=\"f1-datepicker__header\">\n <button\n type=\"button\"\n class=\"f1-datepicker__nav-btn\"\n (click)=\"previousMonth()\"\n aria-label=\"Previous month\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"15 18 9 12 15 6\"></polyline>\n </svg>\n </button>\n\n <div class=\"f1-datepicker__selectors\">\n <select\n class=\"f1-datepicker__select\"\n [value]=\"viewDate.month\"\n (change)=\"onMonthChange($event)\"\n >\n <option *ngFor=\"let month of monthNames; let i = index\" [value]=\"i + 1\">\n {{ month }}\n </option>\n </select>\n\n <select\n class=\"f1-datepicker__select\"\n [value]=\"viewDate.year\"\n (change)=\"onYearChange($event)\"\n >\n <option *ngFor=\"let year of years\" [value]=\"year\">\n {{ useNepaliDigits ? (year | number:'1.0-0') : year }}\n </option>\n </select>\n </div>\n\n <button\n type=\"button\"\n class=\"f1-datepicker__nav-btn\"\n (click)=\"nextMonth()\"\n aria-label=\"Next month\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n </button>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"f1-datepicker__weekdays\">\n <div class=\"f1-datepicker__weekday\" *ngFor=\"let day of weekdayNames\">\n {{ day }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"f1-datepicker__grid\">\n <div class=\"f1-datepicker__week\" *ngFor=\"let week of calendarGrid; trackBy: trackByWeek\">\n <button\n type=\"button\"\n class=\"f1-datepicker__day\"\n *ngFor=\"let day of week; trackBy: trackByDay\"\n [class.f1-datepicker__day--empty]=\"day === null\"\n [class.f1-datepicker__day--today]=\"day !== null && isToday(day)\"\n [class.f1-datepicker__day--selected]=\"day !== null && isSelected(day)\"\n [class.f1-datepicker__day--disabled]=\"day !== null && !isDateSelectable(day)\"\n [disabled]=\"day === null || !isDateSelectable(day)\"\n (click)=\"selectDate(day)\"\n >\n {{ day !== null ? (useNepaliDigits ? day : day) : '' }}\n </button>\n </div>\n </div>\n\n <!-- Footer -->\n <div class=\"f1-datepicker__footer\" *ngIf=\"showTodayButton\">\n <button\n type=\"button\"\n class=\"f1-datepicker__today-btn\"\n (click)=\"selectToday()\"\n >\n {{ language === 'np' ? '\u0906\u091C' : 'Today' }}\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--f1-datepicker-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.f1-datepicker{--f1-dp-bg: #ffffff;--f1-dp-text: #1a1a2e;--f1-dp-text-muted: #64748b;--f1-dp-border: #e2e8f0;--f1-dp-primary: #6366f1;--f1-dp-primary-hover: #4f46e5;--f1-dp-primary-text: #ffffff;--f1-dp-hover-bg: #f1f5f9;--f1-dp-today-bg: #eef2ff;--f1-dp-today-border: #6366f1;--f1-dp-disabled-text: #cbd5e1;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .12);--f1-dp-input-bg: #ffffff;--f1-dp-dropdown-bg: #ffffff;position:relative;width:280px}.f1-datepicker--dark{--f1-dp-bg: #1e1e2e;--f1-dp-text: #f8fafc;--f1-dp-text-muted: #94a3b8;--f1-dp-border: #334155;--f1-dp-primary: #818cf8;--f1-dp-primary-hover: #a5b4fc;--f1-dp-primary-text: #1e1e2e;--f1-dp-hover-bg: #2d2d44;--f1-dp-today-bg: #312e81;--f1-dp-today-border: #818cf8;--f1-dp-disabled-text: #475569;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .4);--f1-dp-input-bg: #1e1e2e;--f1-dp-dropdown-bg: #1e1e2e}.f1-datepicker--disabled{opacity:.6;cursor:not-allowed}.f1-datepicker__input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.f1-datepicker--disabled .f1-datepicker__input-wrapper{cursor:not-allowed}.f1-datepicker__input{width:100%;padding:12px 44px 12px 14px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:var(--f1-dp-input-bg);border:2px solid var(--f1-dp-border);border-radius:10px;outline:none;cursor:pointer;transition:all .2s ease}.f1-datepicker__input::placeholder{color:var(--f1-dp-text-muted)}.f1-datepicker__input:hover:not(:disabled){border-color:var(--f1-dp-primary)}.f1-datepicker__input:focus{border-color:var(--f1-dp-primary);box-shadow:0 0 0 3px #6366f126}.f1-datepicker__input:disabled{cursor:not-allowed;background:var(--f1-dp-hover-bg)}.f1-datepicker__icon{position:absolute;right:12px;display:flex;align-items:center;justify-content:center;color:var(--f1-dp-text-muted);pointer-events:none;transition:color .2s ease}.f1-datepicker__input-wrapper:hover .f1-datepicker__icon{color:var(--f1-dp-primary)}.f1-datepicker__clear{position:absolute;right:38px;display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--f1-dp-text-muted);background:transparent;border:none;border-radius:50%;cursor:pointer;transition:all .2s ease}.f1-datepicker__clear:hover{color:var(--f1-dp-text);background:var(--f1-dp-hover-bg)}.f1-datepicker__dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:1000;width:100%;min-width:300px;padding:16px;background:var(--f1-dp-dropdown-bg);border:1px solid var(--f1-dp-border);border-radius:14px;box-shadow:var(--f1-dp-shadow);animation:slideDown .2s ease}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.f1-datepicker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.f1-datepicker__nav-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__nav-btn:hover{background:var(--f1-dp-hover-bg);color:var(--f1-dp-primary)}.f1-datepicker__nav-btn:active{transform:scale(.95)}.f1-datepicker__selectors{display:flex;gap:8px}.f1-datepicker__select{padding:8px 28px 8px 12px;font-size:14px;font-weight:600;color:var(--f1-dp-text);background:var(--f1-dp-hover-bg);border:none;border-radius:8px;cursor:pointer;transition:all .2s ease;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center}.f1-datepicker__select:hover{background-color:var(--f1-dp-border)}.f1-datepicker__select:focus{outline:none;box-shadow:0 0 0 2px var(--f1-dp-primary)}.f1-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}.f1-datepicker__weekday{padding:8px 0;font-size:12px;font-weight:600;color:var(--f1-dp-text-muted);text-align:center;text-transform:uppercase;letter-spacing:.5px}.f1-datepicker__grid{display:flex;flex-direction:column;gap:4px}.f1-datepicker__week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.f1-datepicker__day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .15s ease}.f1-datepicker__day:hover:not(:disabled):not(.f1-datepicker__day--selected):not(.f1-datepicker__day--empty){background:var(--f1-dp-hover-bg)}.f1-datepicker__day--empty{visibility:hidden;cursor:default}.f1-datepicker__day--today{background:var(--f1-dp-today-bg);border:2px solid var(--f1-dp-today-border);font-weight:700}.f1-datepicker__day--selected{background:var(--f1-dp-primary)!important;color:var(--f1-dp-primary-text)!important;font-weight:700}.f1-datepicker__day--selected:hover{background:var(--f1-dp-primary-hover)!important}.f1-datepicker__day--disabled{color:var(--f1-dp-disabled-text);cursor:not-allowed}.f1-datepicker__day--disabled:hover{background:transparent}.f1-datepicker__footer{display:flex;justify-content:center;margin-top:12px;padding-top:12px;border-top:1px solid var(--f1-dp-border)}.f1-datepicker__today-btn{padding:8px 20px;font-size:13px;font-weight:600;color:var(--f1-dp-primary);background:transparent;border:2px solid var(--f1-dp-primary);border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__today-btn:hover{background:var(--f1-dp-primary);color:var(--f1-dp-primary-text)}.f1-datepicker__today-btn:active{transform:scale(.98)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
966
|
+
], usesOnChanges: true, ngImport: i0, template: "<div class=\"f1-datepicker\" [class.f1-datepicker--dark]=\"theme === 'dark'\" [class.f1-datepicker--disabled]=\"disabled\">\n <!-- Input Field -->\n <div class=\"f1-datepicker__input-wrapper\" (click)=\"toggleCalendar()\">\n <input type=\"text\" class=\"f1-datepicker__input\" [value]=\"displayValue\" [placeholder]=\"placeholder\"\n [disabled]=\"disabled\" readonly />\n <span class=\"f1-datepicker__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </svg>\n </span>\n <button *ngIf=\"selectedDate && !disabled\" type=\"button\" class=\"f1-datepicker__clear\"\n (click)=\"clearDate(); $event.stopPropagation()\" aria-label=\"Clear date\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <!-- Calendar Dropdown -->\n <div class=\"f1-datepicker__dropdown\" *ngIf=\"isOpen\" [@fadeIn]>\n <!-- Header -->\n <div class=\"f1-datepicker__header\">\n <button type=\"button\" class=\"f1-datepicker__nav-btn\" (click)=\"previousMonth()\" aria-label=\"Previous month\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"15 18 9 12 15 6\"></polyline>\n </svg>\n </button>\n\n <div class=\"f1-datepicker__selectors\">\n <select class=\"f1-datepicker__select\" [value]=\"viewDate.month\" (change)=\"onMonthChange($event)\">\n <option *ngFor=\"let month of monthNames; let i = index\" [value]=\"i + 1\">\n {{ month }}\n </option>\n </select>\n\n <select class=\"f1-datepicker__select\" [value]=\"viewDate.year\" (change)=\"onYearChange($event)\">\n <option *ngFor=\"let year of years\" [value]=\"year\">\n {{ formatYear(year) }}\n </option>\n </select>\n </div>\n\n <button type=\"button\" class=\"f1-datepicker__nav-btn\" (click)=\"nextMonth()\" aria-label=\"Next month\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n </button>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"f1-datepicker__weekdays\">\n <div class=\"f1-datepicker__weekday\" *ngFor=\"let day of weekdayNames\">\n {{ day }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"f1-datepicker__grid\">\n <div class=\"f1-datepicker__week\" *ngFor=\"let week of calendarGrid; trackBy: trackByWeek\">\n <button type=\"button\" class=\"f1-datepicker__day\" *ngFor=\"let day of week; trackBy: trackByDay\"\n [class.f1-datepicker__day--empty]=\"day === null\"\n [class.f1-datepicker__day--today]=\"day !== null && isToday(day)\"\n [class.f1-datepicker__day--selected]=\"day !== null && isSelected(day)\"\n [class.f1-datepicker__day--disabled]=\"day !== null && !isDateSelectable(day)\"\n [disabled]=\"day === null || !isDateSelectable(day)\" (click)=\"selectDate(day)\">\n {{ formatDay(day) }}\n </button>\n </div>\n </div>\n\n <!-- Footer -->\n <div class=\"f1-datepicker__footer\" *ngIf=\"showTodayButton\">\n <button type=\"button\" class=\"f1-datepicker__today-btn\" (click)=\"selectToday()\">\n {{ language === 'np' ? '\u0906\u091C' : 'Today' }}\n </button>\n </div>\n </div>\n</div>", styles: [":host{display:inline-block;font-family:var(--f1-datepicker-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.f1-datepicker{--f1-dp-bg: #ffffff;--f1-dp-text: #1a1a2e;--f1-dp-text-muted: #64748b;--f1-dp-border: #e2e8f0;--f1-dp-primary: #6366f1;--f1-dp-primary-hover: #4f46e5;--f1-dp-primary-text: #ffffff;--f1-dp-hover-bg: #f1f5f9;--f1-dp-today-bg: #eef2ff;--f1-dp-today-border: #6366f1;--f1-dp-disabled-text: #cbd5e1;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .12);--f1-dp-input-bg: #ffffff;--f1-dp-dropdown-bg: #ffffff;position:relative;width:280px}.f1-datepicker--dark{--f1-dp-bg: #1e1e2e;--f1-dp-text: #f8fafc;--f1-dp-text-muted: #94a3b8;--f1-dp-border: #334155;--f1-dp-primary: #818cf8;--f1-dp-primary-hover: #a5b4fc;--f1-dp-primary-text: #1e1e2e;--f1-dp-hover-bg: #2d2d44;--f1-dp-today-bg: #312e81;--f1-dp-today-border: #818cf8;--f1-dp-disabled-text: #475569;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .4);--f1-dp-input-bg: #1e1e2e;--f1-dp-dropdown-bg: #1e1e2e}.f1-datepicker--disabled{opacity:.6;cursor:not-allowed}.f1-datepicker__input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.f1-datepicker--disabled .f1-datepicker__input-wrapper{cursor:not-allowed}.f1-datepicker__input{width:100%;padding:12px 44px 12px 14px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:var(--f1-dp-input-bg);border:2px solid var(--f1-dp-border);border-radius:10px;outline:none;cursor:pointer;transition:all .2s ease}.f1-datepicker__input::placeholder{color:var(--f1-dp-text-muted)}.f1-datepicker__input:hover:not(:disabled){border-color:var(--f1-dp-primary)}.f1-datepicker__input:focus{border-color:var(--f1-dp-primary);box-shadow:0 0 0 3px #6366f126}.f1-datepicker__input:disabled{cursor:not-allowed;background:var(--f1-dp-hover-bg)}.f1-datepicker__icon{position:absolute;right:12px;display:flex;align-items:center;justify-content:center;color:var(--f1-dp-text-muted);pointer-events:none;transition:color .2s ease}.f1-datepicker__input-wrapper:hover .f1-datepicker__icon{color:var(--f1-dp-primary)}.f1-datepicker__clear{position:absolute;right:38px;display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--f1-dp-text-muted);background:transparent;border:none;border-radius:50%;cursor:pointer;transition:all .2s ease}.f1-datepicker__clear:hover{color:var(--f1-dp-text);background:var(--f1-dp-hover-bg)}.f1-datepicker__dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:1000;width:100%;min-width:300px;padding:16px;background:var(--f1-dp-dropdown-bg);border:1px solid var(--f1-dp-border);border-radius:14px;box-shadow:var(--f1-dp-shadow);animation:slideDown .2s ease}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.f1-datepicker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.f1-datepicker__nav-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__nav-btn:hover{background:var(--f1-dp-hover-bg);color:var(--f1-dp-primary)}.f1-datepicker__nav-btn:active{transform:scale(.95)}.f1-datepicker__selectors{display:flex;gap:8px}.f1-datepicker__select{padding:8px 28px 8px 12px;font-size:14px;font-weight:600;color:var(--f1-dp-text);background:var(--f1-dp-hover-bg);border:none;border-radius:8px;cursor:pointer;transition:all .2s ease;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center}.f1-datepicker__select:hover{background-color:var(--f1-dp-border)}.f1-datepicker__select:focus{outline:none;box-shadow:0 0 0 2px var(--f1-dp-primary)}.f1-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}.f1-datepicker__weekday{padding:8px 0;font-size:12px;font-weight:600;color:var(--f1-dp-text-muted);text-align:center;text-transform:uppercase;letter-spacing:.5px}.f1-datepicker__grid{display:flex;flex-direction:column;gap:4px}.f1-datepicker__week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.f1-datepicker__day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .15s ease}.f1-datepicker__day:hover:not(:disabled):not(.f1-datepicker__day--selected):not(.f1-datepicker__day--empty){background:var(--f1-dp-hover-bg)}.f1-datepicker__day--empty{visibility:hidden;cursor:default}.f1-datepicker__day--today{background:var(--f1-dp-today-bg);border:2px solid var(--f1-dp-today-border);font-weight:700}.f1-datepicker__day--selected{background:var(--f1-dp-primary)!important;color:var(--f1-dp-primary-text)!important;font-weight:700}.f1-datepicker__day--selected:hover{background:var(--f1-dp-primary-hover)!important}.f1-datepicker__day--disabled{color:var(--f1-dp-disabled-text);cursor:not-allowed}.f1-datepicker__day--disabled:hover{background:transparent}.f1-datepicker__footer{display:flex;justify-content:center;margin-top:12px;padding-top:12px;border-top:1px solid var(--f1-dp-border)}.f1-datepicker__today-btn{padding:8px 20px;font-size:13px;font-weight:600;color:var(--f1-dp-primary);background:transparent;border:2px solid var(--f1-dp-primary);border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__today-btn:hover{background:var(--f1-dp-primary);color:var(--f1-dp-primary-text)}.f1-datepicker__today-btn:active{transform:scale(.98)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
806
967
|
}
|
|
807
968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NepaliDatePickerComponent, decorators: [{
|
|
808
969
|
type: Component,
|
|
@@ -812,7 +973,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
812
973
|
useExisting: forwardRef(() => NepaliDatePickerComponent),
|
|
813
974
|
multi: true,
|
|
814
975
|
},
|
|
815
|
-
], template: "<div class=\"f1-datepicker\" [class.f1-datepicker--dark]=\"theme === 'dark'\" [class.f1-datepicker--disabled]=\"disabled\">\n <!-- Input Field -->\n <div class=\"f1-datepicker__input-wrapper\" (click)=\"toggleCalendar()\">\n <input\n type=\"text\"\n class=\"f1-datepicker__input\"\n [value]=\"displayValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n readonly\n />\n <span class=\"f1-datepicker__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </svg>\n </span>\n <button\n *ngIf=\"selectedDate && !disabled\"\n type=\"button\"\n class=\"f1-datepicker__clear\"\n (click)=\"clearDate(); $event.stopPropagation()\"\n aria-label=\"Clear date\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <!-- Calendar Dropdown -->\n <div class=\"f1-datepicker__dropdown\" *ngIf=\"isOpen\" [@fadeIn]>\n <!-- Header -->\n <div class=\"f1-datepicker__header\">\n <button\n type=\"button\"\n class=\"f1-datepicker__nav-btn\"\n (click)=\"previousMonth()\"\n aria-label=\"Previous month\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"15 18 9 12 15 6\"></polyline>\n </svg>\n </button>\n\n <div class=\"f1-datepicker__selectors\">\n <select\n class=\"f1-datepicker__select\"\n [value]=\"viewDate.month\"\n (change)=\"onMonthChange($event)\"\n >\n <option *ngFor=\"let month of monthNames; let i = index\" [value]=\"i + 1\">\n {{ month }}\n </option>\n </select>\n\n <select\n class=\"f1-datepicker__select\"\n [value]=\"viewDate.year\"\n (change)=\"onYearChange($event)\"\n >\n <option *ngFor=\"let year of years\" [value]=\"year\">\n {{ useNepaliDigits ? (year | number:'1.0-0') : year }}\n </option>\n </select>\n </div>\n\n <button\n type=\"button\"\n class=\"f1-datepicker__nav-btn\"\n (click)=\"nextMonth()\"\n aria-label=\"Next month\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n </button>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"f1-datepicker__weekdays\">\n <div class=\"f1-datepicker__weekday\" *ngFor=\"let day of weekdayNames\">\n {{ day }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"f1-datepicker__grid\">\n <div class=\"f1-datepicker__week\" *ngFor=\"let week of calendarGrid; trackBy: trackByWeek\">\n <button\n type=\"button\"\n class=\"f1-datepicker__day\"\n *ngFor=\"let day of week; trackBy: trackByDay\"\n [class.f1-datepicker__day--empty]=\"day === null\"\n [class.f1-datepicker__day--today]=\"day !== null && isToday(day)\"\n [class.f1-datepicker__day--selected]=\"day !== null && isSelected(day)\"\n [class.f1-datepicker__day--disabled]=\"day !== null && !isDateSelectable(day)\"\n [disabled]=\"day === null || !isDateSelectable(day)\"\n (click)=\"selectDate(day)\"\n >\n {{ day !== null ? (useNepaliDigits ? day : day) : '' }}\n </button>\n </div>\n </div>\n\n <!-- Footer -->\n <div class=\"f1-datepicker__footer\" *ngIf=\"showTodayButton\">\n <button\n type=\"button\"\n class=\"f1-datepicker__today-btn\"\n (click)=\"selectToday()\"\n >\n {{ language === 'np' ? '\u0906\u091C' : 'Today' }}\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;font-family:var(--f1-datepicker-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.f1-datepicker{--f1-dp-bg: #ffffff;--f1-dp-text: #1a1a2e;--f1-dp-text-muted: #64748b;--f1-dp-border: #e2e8f0;--f1-dp-primary: #6366f1;--f1-dp-primary-hover: #4f46e5;--f1-dp-primary-text: #ffffff;--f1-dp-hover-bg: #f1f5f9;--f1-dp-today-bg: #eef2ff;--f1-dp-today-border: #6366f1;--f1-dp-disabled-text: #cbd5e1;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .12);--f1-dp-input-bg: #ffffff;--f1-dp-dropdown-bg: #ffffff;position:relative;width:280px}.f1-datepicker--dark{--f1-dp-bg: #1e1e2e;--f1-dp-text: #f8fafc;--f1-dp-text-muted: #94a3b8;--f1-dp-border: #334155;--f1-dp-primary: #818cf8;--f1-dp-primary-hover: #a5b4fc;--f1-dp-primary-text: #1e1e2e;--f1-dp-hover-bg: #2d2d44;--f1-dp-today-bg: #312e81;--f1-dp-today-border: #818cf8;--f1-dp-disabled-text: #475569;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .4);--f1-dp-input-bg: #1e1e2e;--f1-dp-dropdown-bg: #1e1e2e}.f1-datepicker--disabled{opacity:.6;cursor:not-allowed}.f1-datepicker__input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.f1-datepicker--disabled .f1-datepicker__input-wrapper{cursor:not-allowed}.f1-datepicker__input{width:100%;padding:12px 44px 12px 14px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:var(--f1-dp-input-bg);border:2px solid var(--f1-dp-border);border-radius:10px;outline:none;cursor:pointer;transition:all .2s ease}.f1-datepicker__input::placeholder{color:var(--f1-dp-text-muted)}.f1-datepicker__input:hover:not(:disabled){border-color:var(--f1-dp-primary)}.f1-datepicker__input:focus{border-color:var(--f1-dp-primary);box-shadow:0 0 0 3px #6366f126}.f1-datepicker__input:disabled{cursor:not-allowed;background:var(--f1-dp-hover-bg)}.f1-datepicker__icon{position:absolute;right:12px;display:flex;align-items:center;justify-content:center;color:var(--f1-dp-text-muted);pointer-events:none;transition:color .2s ease}.f1-datepicker__input-wrapper:hover .f1-datepicker__icon{color:var(--f1-dp-primary)}.f1-datepicker__clear{position:absolute;right:38px;display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--f1-dp-text-muted);background:transparent;border:none;border-radius:50%;cursor:pointer;transition:all .2s ease}.f1-datepicker__clear:hover{color:var(--f1-dp-text);background:var(--f1-dp-hover-bg)}.f1-datepicker__dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:1000;width:100%;min-width:300px;padding:16px;background:var(--f1-dp-dropdown-bg);border:1px solid var(--f1-dp-border);border-radius:14px;box-shadow:var(--f1-dp-shadow);animation:slideDown .2s ease}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.f1-datepicker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.f1-datepicker__nav-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__nav-btn:hover{background:var(--f1-dp-hover-bg);color:var(--f1-dp-primary)}.f1-datepicker__nav-btn:active{transform:scale(.95)}.f1-datepicker__selectors{display:flex;gap:8px}.f1-datepicker__select{padding:8px 28px 8px 12px;font-size:14px;font-weight:600;color:var(--f1-dp-text);background:var(--f1-dp-hover-bg);border:none;border-radius:8px;cursor:pointer;transition:all .2s ease;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center}.f1-datepicker__select:hover{background-color:var(--f1-dp-border)}.f1-datepicker__select:focus{outline:none;box-shadow:0 0 0 2px var(--f1-dp-primary)}.f1-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}.f1-datepicker__weekday{padding:8px 0;font-size:12px;font-weight:600;color:var(--f1-dp-text-muted);text-align:center;text-transform:uppercase;letter-spacing:.5px}.f1-datepicker__grid{display:flex;flex-direction:column;gap:4px}.f1-datepicker__week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.f1-datepicker__day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .15s ease}.f1-datepicker__day:hover:not(:disabled):not(.f1-datepicker__day--selected):not(.f1-datepicker__day--empty){background:var(--f1-dp-hover-bg)}.f1-datepicker__day--empty{visibility:hidden;cursor:default}.f1-datepicker__day--today{background:var(--f1-dp-today-bg);border:2px solid var(--f1-dp-today-border);font-weight:700}.f1-datepicker__day--selected{background:var(--f1-dp-primary)!important;color:var(--f1-dp-primary-text)!important;font-weight:700}.f1-datepicker__day--selected:hover{background:var(--f1-dp-primary-hover)!important}.f1-datepicker__day--disabled{color:var(--f1-dp-disabled-text);cursor:not-allowed}.f1-datepicker__day--disabled:hover{background:transparent}.f1-datepicker__footer{display:flex;justify-content:center;margin-top:12px;padding-top:12px;border-top:1px solid var(--f1-dp-border)}.f1-datepicker__today-btn{padding:8px 20px;font-size:13px;font-weight:600;color:var(--f1-dp-primary);background:transparent;border:2px solid var(--f1-dp-primary);border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__today-btn:hover{background:var(--f1-dp-primary);color:var(--f1-dp-primary-text)}.f1-datepicker__today-btn:active{transform:scale(.98)}\n"] }]
|
|
976
|
+
], template: "<div class=\"f1-datepicker\" [class.f1-datepicker--dark]=\"theme === 'dark'\" [class.f1-datepicker--disabled]=\"disabled\">\n <!-- Input Field -->\n <div class=\"f1-datepicker__input-wrapper\" (click)=\"toggleCalendar()\">\n <input type=\"text\" class=\"f1-datepicker__input\" [value]=\"displayValue\" [placeholder]=\"placeholder\"\n [disabled]=\"disabled\" readonly />\n <span class=\"f1-datepicker__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"></line>\n </svg>\n </span>\n <button *ngIf=\"selectedDate && !disabled\" type=\"button\" class=\"f1-datepicker__clear\"\n (click)=\"clearDate(); $event.stopPropagation()\" aria-label=\"Clear date\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <!-- Calendar Dropdown -->\n <div class=\"f1-datepicker__dropdown\" *ngIf=\"isOpen\" [@fadeIn]>\n <!-- Header -->\n <div class=\"f1-datepicker__header\">\n <button type=\"button\" class=\"f1-datepicker__nav-btn\" (click)=\"previousMonth()\" aria-label=\"Previous month\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"15 18 9 12 15 6\"></polyline>\n </svg>\n </button>\n\n <div class=\"f1-datepicker__selectors\">\n <select class=\"f1-datepicker__select\" [value]=\"viewDate.month\" (change)=\"onMonthChange($event)\">\n <option *ngFor=\"let month of monthNames; let i = index\" [value]=\"i + 1\">\n {{ month }}\n </option>\n </select>\n\n <select class=\"f1-datepicker__select\" [value]=\"viewDate.year\" (change)=\"onYearChange($event)\">\n <option *ngFor=\"let year of years\" [value]=\"year\">\n {{ formatYear(year) }}\n </option>\n </select>\n </div>\n\n <button type=\"button\" class=\"f1-datepicker__nav-btn\" (click)=\"nextMonth()\" aria-label=\"Next month\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n </button>\n </div>\n\n <!-- Weekday Headers -->\n <div class=\"f1-datepicker__weekdays\">\n <div class=\"f1-datepicker__weekday\" *ngFor=\"let day of weekdayNames\">\n {{ day }}\n </div>\n </div>\n\n <!-- Calendar Grid -->\n <div class=\"f1-datepicker__grid\">\n <div class=\"f1-datepicker__week\" *ngFor=\"let week of calendarGrid; trackBy: trackByWeek\">\n <button type=\"button\" class=\"f1-datepicker__day\" *ngFor=\"let day of week; trackBy: trackByDay\"\n [class.f1-datepicker__day--empty]=\"day === null\"\n [class.f1-datepicker__day--today]=\"day !== null && isToday(day)\"\n [class.f1-datepicker__day--selected]=\"day !== null && isSelected(day)\"\n [class.f1-datepicker__day--disabled]=\"day !== null && !isDateSelectable(day)\"\n [disabled]=\"day === null || !isDateSelectable(day)\" (click)=\"selectDate(day)\">\n {{ formatDay(day) }}\n </button>\n </div>\n </div>\n\n <!-- Footer -->\n <div class=\"f1-datepicker__footer\" *ngIf=\"showTodayButton\">\n <button type=\"button\" class=\"f1-datepicker__today-btn\" (click)=\"selectToday()\">\n {{ language === 'np' ? '\u0906\u091C' : 'Today' }}\n </button>\n </div>\n </div>\n</div>", styles: [":host{display:inline-block;font-family:var(--f1-datepicker-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)}.f1-datepicker{--f1-dp-bg: #ffffff;--f1-dp-text: #1a1a2e;--f1-dp-text-muted: #64748b;--f1-dp-border: #e2e8f0;--f1-dp-primary: #6366f1;--f1-dp-primary-hover: #4f46e5;--f1-dp-primary-text: #ffffff;--f1-dp-hover-bg: #f1f5f9;--f1-dp-today-bg: #eef2ff;--f1-dp-today-border: #6366f1;--f1-dp-disabled-text: #cbd5e1;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .12);--f1-dp-input-bg: #ffffff;--f1-dp-dropdown-bg: #ffffff;position:relative;width:280px}.f1-datepicker--dark{--f1-dp-bg: #1e1e2e;--f1-dp-text: #f8fafc;--f1-dp-text-muted: #94a3b8;--f1-dp-border: #334155;--f1-dp-primary: #818cf8;--f1-dp-primary-hover: #a5b4fc;--f1-dp-primary-text: #1e1e2e;--f1-dp-hover-bg: #2d2d44;--f1-dp-today-bg: #312e81;--f1-dp-today-border: #818cf8;--f1-dp-disabled-text: #475569;--f1-dp-shadow: 0 10px 40px rgba(0, 0, 0, .4);--f1-dp-input-bg: #1e1e2e;--f1-dp-dropdown-bg: #1e1e2e}.f1-datepicker--disabled{opacity:.6;cursor:not-allowed}.f1-datepicker__input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.f1-datepicker--disabled .f1-datepicker__input-wrapper{cursor:not-allowed}.f1-datepicker__input{width:100%;padding:12px 44px 12px 14px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:var(--f1-dp-input-bg);border:2px solid var(--f1-dp-border);border-radius:10px;outline:none;cursor:pointer;transition:all .2s ease}.f1-datepicker__input::placeholder{color:var(--f1-dp-text-muted)}.f1-datepicker__input:hover:not(:disabled){border-color:var(--f1-dp-primary)}.f1-datepicker__input:focus{border-color:var(--f1-dp-primary);box-shadow:0 0 0 3px #6366f126}.f1-datepicker__input:disabled{cursor:not-allowed;background:var(--f1-dp-hover-bg)}.f1-datepicker__icon{position:absolute;right:12px;display:flex;align-items:center;justify-content:center;color:var(--f1-dp-text-muted);pointer-events:none;transition:color .2s ease}.f1-datepicker__input-wrapper:hover .f1-datepicker__icon{color:var(--f1-dp-primary)}.f1-datepicker__clear{position:absolute;right:38px;display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--f1-dp-text-muted);background:transparent;border:none;border-radius:50%;cursor:pointer;transition:all .2s ease}.f1-datepicker__clear:hover{color:var(--f1-dp-text);background:var(--f1-dp-hover-bg)}.f1-datepicker__dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:1000;width:100%;min-width:300px;padding:16px;background:var(--f1-dp-dropdown-bg);border:1px solid var(--f1-dp-border);border-radius:14px;box-shadow:var(--f1-dp-shadow);animation:slideDown .2s ease}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.f1-datepicker__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.f1-datepicker__nav-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__nav-btn:hover{background:var(--f1-dp-hover-bg);color:var(--f1-dp-primary)}.f1-datepicker__nav-btn:active{transform:scale(.95)}.f1-datepicker__selectors{display:flex;gap:8px}.f1-datepicker__select{padding:8px 28px 8px 12px;font-size:14px;font-weight:600;color:var(--f1-dp-text);background:var(--f1-dp-hover-bg);border:none;border-radius:8px;cursor:pointer;transition:all .2s ease;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 8px center}.f1-datepicker__select:hover{background-color:var(--f1-dp-border)}.f1-datepicker__select:focus{outline:none;box-shadow:0 0 0 2px var(--f1-dp-primary)}.f1-datepicker__weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}.f1-datepicker__weekday{padding:8px 0;font-size:12px;font-weight:600;color:var(--f1-dp-text-muted);text-align:center;text-transform:uppercase;letter-spacing:.5px}.f1-datepicker__grid{display:flex;flex-direction:column;gap:4px}.f1-datepicker__week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.f1-datepicker__day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;font-size:14px;font-weight:500;color:var(--f1-dp-text);background:transparent;border:none;border-radius:8px;cursor:pointer;transition:all .15s ease}.f1-datepicker__day:hover:not(:disabled):not(.f1-datepicker__day--selected):not(.f1-datepicker__day--empty){background:var(--f1-dp-hover-bg)}.f1-datepicker__day--empty{visibility:hidden;cursor:default}.f1-datepicker__day--today{background:var(--f1-dp-today-bg);border:2px solid var(--f1-dp-today-border);font-weight:700}.f1-datepicker__day--selected{background:var(--f1-dp-primary)!important;color:var(--f1-dp-primary-text)!important;font-weight:700}.f1-datepicker__day--selected:hover{background:var(--f1-dp-primary-hover)!important}.f1-datepicker__day--disabled{color:var(--f1-dp-disabled-text);cursor:not-allowed}.f1-datepicker__day--disabled:hover{background:transparent}.f1-datepicker__footer{display:flex;justify-content:center;margin-top:12px;padding-top:12px;border-top:1px solid var(--f1-dp-border)}.f1-datepicker__today-btn{padding:8px 20px;font-size:13px;font-weight:600;color:var(--f1-dp-primary);background:transparent;border:2px solid var(--f1-dp-primary);border-radius:8px;cursor:pointer;transition:all .2s ease}.f1-datepicker__today-btn:hover{background:var(--f1-dp-primary);color:var(--f1-dp-primary-text)}.f1-datepicker__today-btn:active{transform:scale(.98)}\n"] }]
|
|
816
977
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: DateConverterService }]; }, propDecorators: { minDate: [{
|
|
817
978
|
type: Input
|
|
818
979
|
}], maxDate: [{
|