ngx-datex 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/fesm2022/ngx-datex.mjs +571 -73
- package/fesm2022/ngx-datex.mjs.map +1 -0
- package/package.json +1 -1
- package/types/ngx-datex.d.ts +481 -22
package/fesm2022/ngx-datex.mjs
CHANGED
|
@@ -172,11 +172,30 @@ function isSameMonth(date1, date2) {
|
|
|
172
172
|
function isSameYear(date1, date2) {
|
|
173
173
|
return sameYear(date1, date2);
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Formats a date using the specified format string and locale.
|
|
177
|
+
* Follows vanilla-daterangepicker logic by always using locale.format.
|
|
178
|
+
*
|
|
179
|
+
* @param date - The date to format
|
|
180
|
+
* @param formatStr - Format string (e.g., 'DD/MM/YYYY', 'MM/DD/YYYY HH:mm')
|
|
181
|
+
* @param locale - Optional locale string (e.g., 'es-ES', 'en-US')
|
|
182
|
+
* @returns Formatted date string
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const date = new Date('2024-01-15 14:30:00');
|
|
187
|
+
* formatDateValue(date, 'DD/MM/YYYY'); // '15/01/2024'
|
|
188
|
+
* formatDateValue(date, 'MM/DD/YYYY hh:mm A'); // '01/15/2024 02:30 PM'
|
|
189
|
+
* formatDateValue(date, 'DD/MM/YYYY HH:mm', 'es-ES'); // '15/01/2024 14:30'
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
function formatDateValue(date, formatStr, locale) {
|
|
176
193
|
try {
|
|
177
|
-
|
|
194
|
+
// Use @formkit/tempo with locale support (following vanilla-daterangepicker pattern)
|
|
195
|
+
return format(date, formatStr, locale);
|
|
178
196
|
}
|
|
179
197
|
catch {
|
|
198
|
+
// Fallback to manual formatting if tempo fails
|
|
180
199
|
const year = date.getFullYear();
|
|
181
200
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
182
201
|
const day = String(date.getDate()).padStart(2, '0');
|
|
@@ -196,9 +215,26 @@ function formatDateValue(date, formatStr) {
|
|
|
196
215
|
.replace(/A/g, ampm);
|
|
197
216
|
}
|
|
198
217
|
}
|
|
199
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Parses a date string using the specified format string and locale.
|
|
220
|
+
* Follows vanilla-daterangepicker logic by always using locale.format.
|
|
221
|
+
*
|
|
222
|
+
* @param dateStr - The date string to parse
|
|
223
|
+
* @param formatStr - Format string (e.g., 'DD/MM/YYYY', 'MM/DD/YYYY HH:mm')
|
|
224
|
+
* @param locale - Optional locale string (e.g., 'es-ES', 'en-US')
|
|
225
|
+
* @returns Parsed Date object
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* const date1 = parseDateValue('15/01/2024', 'DD/MM/YYYY'); // January 15, 2024
|
|
230
|
+
* const date2 = parseDateValue('01/15/2024 02:30 PM', 'MM/DD/YYYY hh:mm A'); // January 15, 2024 14:30
|
|
231
|
+
* const date3 = parseDateValue('15/01/2024 14:30', 'DD/MM/YYYY HH:mm', 'es-ES'); // January 15, 2024 14:30
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
function parseDateValue(dateStr, formatStr, locale) {
|
|
200
235
|
try {
|
|
201
|
-
|
|
236
|
+
// Use @formkit/tempo with locale support (following vanilla-daterangepicker pattern)
|
|
237
|
+
const parsed = parse(dateStr, formatStr, locale);
|
|
202
238
|
if (isValidDate(parsed)) {
|
|
203
239
|
return parsed;
|
|
204
240
|
}
|
|
@@ -206,6 +242,7 @@ function parseDateValue(dateStr, formatStr) {
|
|
|
206
242
|
catch {
|
|
207
243
|
// Fallback to manual parsing
|
|
208
244
|
}
|
|
245
|
+
// Manual parsing fallback for common formats
|
|
209
246
|
if (formatStr === 'YYYY-MM-DD') {
|
|
210
247
|
const parts = dateStr.split('-');
|
|
211
248
|
if (parts.length === 3) {
|
|
@@ -243,6 +280,7 @@ function parseDateValue(dateStr, formatStr) {
|
|
|
243
280
|
return date;
|
|
244
281
|
}
|
|
245
282
|
}
|
|
283
|
+
// Final fallback to native Date parsing
|
|
246
284
|
return new Date(dateStr);
|
|
247
285
|
}
|
|
248
286
|
function isSameDate(date1, date2, unit = 'day') {
|
|
@@ -255,6 +293,15 @@ function isSameDate(date1, date2, unit = 'day') {
|
|
|
255
293
|
return isSameMonth(date1, date2);
|
|
256
294
|
case 'year':
|
|
257
295
|
return isSameYear(date1, date2);
|
|
296
|
+
case 'minute':
|
|
297
|
+
return (isSameDay(date1, date2) &&
|
|
298
|
+
date1.getHours() === date2.getHours() &&
|
|
299
|
+
date1.getMinutes() === date2.getMinutes());
|
|
300
|
+
case 'second':
|
|
301
|
+
return (isSameDay(date1, date2) &&
|
|
302
|
+
date1.getHours() === date2.getHours() &&
|
|
303
|
+
date1.getMinutes() === date2.getMinutes() &&
|
|
304
|
+
date1.getSeconds() === date2.getSeconds());
|
|
258
305
|
default:
|
|
259
306
|
return false;
|
|
260
307
|
}
|
|
@@ -293,6 +340,7 @@ function isMobileDevice() {
|
|
|
293
340
|
* ```
|
|
294
341
|
*/
|
|
295
342
|
const SPANISH_LOCALE = {
|
|
343
|
+
locale: 'es-ES',
|
|
296
344
|
direction: 'ltr',
|
|
297
345
|
format: 'DD/MM/YYYY',
|
|
298
346
|
separator: ' - ',
|
|
@@ -317,6 +365,136 @@ const SPANISH_LOCALE = {
|
|
|
317
365
|
],
|
|
318
366
|
firstDay: 1, // Lunes como primer día
|
|
319
367
|
};
|
|
368
|
+
/**
|
|
369
|
+
* Spanish locale with time picker support (24-hour format).
|
|
370
|
+
*
|
|
371
|
+
* Same as SPANISH_LOCALE but with DD/MM/YYYY HH:mm format for time picker usage.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```typescript
|
|
375
|
+
* <ngx-datex [locale]="SPANISH_LOCALE_WITH_TIME" [timePicker]="true"></ngx-datex>
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
const SPANISH_LOCALE_WITH_TIME = {
|
|
379
|
+
...SPANISH_LOCALE,
|
|
380
|
+
format: 'DD/MM/YYYY HH:mm',
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Spanish locale with time picker support (12-hour format).
|
|
384
|
+
*
|
|
385
|
+
* Same as SPANISH_LOCALE but with DD/MM/YYYY hh:mm A format for 12-hour time picker.
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```typescript
|
|
389
|
+
* <ngx-datex [locale]="SPANISH_LOCALE_WITH_TIME_12H" [timePicker]="true" [timePicker24Hour]="false"></ngx-datex>
|
|
390
|
+
* ```
|
|
391
|
+
*/
|
|
392
|
+
const SPANISH_LOCALE_WITH_TIME_12H = {
|
|
393
|
+
...SPANISH_LOCALE,
|
|
394
|
+
format: 'DD/MM/YYYY hh:mm A',
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* US English locale configuration.
|
|
398
|
+
*
|
|
399
|
+
* Provides English language support with MM/DD/YYYY format,
|
|
400
|
+
* English day/month names, and Sunday as the first day of the week.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* <ngx-datex [locale]="US_ENGLISH_LOCALE"></ngx-datex>
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
const US_ENGLISH_LOCALE = {
|
|
408
|
+
locale: 'en-US',
|
|
409
|
+
direction: 'ltr',
|
|
410
|
+
format: 'MM/DD/YYYY',
|
|
411
|
+
separator: ' - ',
|
|
412
|
+
applyLabel: 'Apply',
|
|
413
|
+
cancelLabel: 'Cancel',
|
|
414
|
+
weekLabel: 'W',
|
|
415
|
+
customRangeLabel: 'Custom Range',
|
|
416
|
+
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
417
|
+
monthNames: [
|
|
418
|
+
'January',
|
|
419
|
+
'February',
|
|
420
|
+
'March',
|
|
421
|
+
'April',
|
|
422
|
+
'May',
|
|
423
|
+
'June',
|
|
424
|
+
'July',
|
|
425
|
+
'August',
|
|
426
|
+
'September',
|
|
427
|
+
'October',
|
|
428
|
+
'November',
|
|
429
|
+
'December',
|
|
430
|
+
],
|
|
431
|
+
firstDay: 0, // Sunday as first day
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* US English locale with time picker support (12-hour format).
|
|
435
|
+
*
|
|
436
|
+
* Same as US_ENGLISH_LOCALE but with MM/DD/YYYY hh:mm A format for time picker usage.
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```typescript
|
|
440
|
+
* <ngx-datex [locale]="US_ENGLISH_LOCALE_WITH_TIME" [timePicker]="true" [timePicker24Hour]="false"></ngx-datex>
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
const US_ENGLISH_LOCALE_WITH_TIME = {
|
|
444
|
+
...US_ENGLISH_LOCALE,
|
|
445
|
+
format: 'MM/DD/YYYY hh:mm A',
|
|
446
|
+
};
|
|
447
|
+
/**
|
|
448
|
+
* ISO format locale configuration.
|
|
449
|
+
*
|
|
450
|
+
* Provides YYYY-MM-DD format commonly used in APIs and databases,
|
|
451
|
+
* with English labels and Monday as the first day of the week.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```typescript
|
|
455
|
+
* <ngx-datex [locale]="ISO_LOCALE"></ngx-datex>
|
|
456
|
+
* ```
|
|
457
|
+
*/
|
|
458
|
+
const ISO_LOCALE = {
|
|
459
|
+
locale: 'en-US',
|
|
460
|
+
direction: 'ltr',
|
|
461
|
+
format: 'YYYY-MM-DD',
|
|
462
|
+
separator: ' / ',
|
|
463
|
+
applyLabel: 'Apply',
|
|
464
|
+
cancelLabel: 'Cancel',
|
|
465
|
+
weekLabel: 'W',
|
|
466
|
+
customRangeLabel: 'Custom Range',
|
|
467
|
+
daysOfWeek: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
|
|
468
|
+
monthNames: [
|
|
469
|
+
'January',
|
|
470
|
+
'February',
|
|
471
|
+
'March',
|
|
472
|
+
'April',
|
|
473
|
+
'May',
|
|
474
|
+
'June',
|
|
475
|
+
'July',
|
|
476
|
+
'August',
|
|
477
|
+
'September',
|
|
478
|
+
'October',
|
|
479
|
+
'November',
|
|
480
|
+
'December',
|
|
481
|
+
],
|
|
482
|
+
firstDay: 1, // Monday as first day
|
|
483
|
+
};
|
|
484
|
+
/**
|
|
485
|
+
* ISO format locale with time picker support (24-hour format).
|
|
486
|
+
*
|
|
487
|
+
* Same as ISO_LOCALE but with YYYY-MM-DD HH:mm format for time picker usage.
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* ```typescript
|
|
491
|
+
* <ngx-datex [locale]="ISO_LOCALE_WITH_TIME" [timePicker]="true"></ngx-datex>
|
|
492
|
+
* ```
|
|
493
|
+
*/
|
|
494
|
+
const ISO_LOCALE_WITH_TIME = {
|
|
495
|
+
...ISO_LOCALE,
|
|
496
|
+
format: 'YYYY-MM-DD HH:mm',
|
|
497
|
+
};
|
|
320
498
|
/**
|
|
321
499
|
* Default Material Design light theme.
|
|
322
500
|
*
|
|
@@ -486,8 +664,8 @@ const DEFAULT_RANGES = {
|
|
|
486
664
|
*
|
|
487
665
|
* // Update configuration
|
|
488
666
|
* this.datexService.updateConfig({
|
|
489
|
-
*
|
|
490
|
-
*
|
|
667
|
+
* firstDayOfWeek: 1,
|
|
668
|
+
* businessDaysOnly: true
|
|
491
669
|
* });
|
|
492
670
|
*
|
|
493
671
|
* // Format a date range
|
|
@@ -505,9 +683,9 @@ class NgxDatexService {
|
|
|
505
683
|
* @example
|
|
506
684
|
* ```typescript
|
|
507
685
|
* this.datexService.updateConfig({
|
|
508
|
-
* dateFormat: 'YYYY-MM-DD',
|
|
509
686
|
* firstDayOfWeek: 0, // Sunday
|
|
510
|
-
* businessDaysOnly: true
|
|
687
|
+
* businessDaysOnly: true,
|
|
688
|
+
* showWeekNumbers: true
|
|
511
689
|
* });
|
|
512
690
|
* ```
|
|
513
691
|
*/
|
|
@@ -1302,11 +1480,20 @@ class NgxDatexCalendarService {
|
|
|
1302
1480
|
onLeftMonthChange(maxLeftMonth);
|
|
1303
1481
|
}
|
|
1304
1482
|
}
|
|
1305
|
-
setStartDate(startDate, minDate, maxDate, timePicker, timePickerIncrement) {
|
|
1483
|
+
setStartDate(startDate, minDate, maxDate, timePicker, timePickerIncrement, currentStartDate) {
|
|
1306
1484
|
let newStartDate = new Date(startDate);
|
|
1307
1485
|
if (!timePicker) {
|
|
1308
1486
|
newStartDate = startOfDay(newStartDate);
|
|
1309
1487
|
}
|
|
1488
|
+
else if (currentStartDate && timePicker) {
|
|
1489
|
+
// When timePicker is enabled, preserve existing time if only date is changing
|
|
1490
|
+
if (newStartDate.getFullYear() !== currentStartDate.getFullYear() ||
|
|
1491
|
+
newStartDate.getMonth() !== currentStartDate.getMonth() ||
|
|
1492
|
+
newStartDate.getDate() !== currentStartDate.getDate()) {
|
|
1493
|
+
// Only date changed, preserve time
|
|
1494
|
+
newStartDate.setHours(currentStartDate.getHours(), currentStartDate.getMinutes(), currentStartDate.getSeconds(), currentStartDate.getMilliseconds());
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1310
1497
|
if (timePicker && timePickerIncrement) {
|
|
1311
1498
|
const minutes = newStartDate.getMinutes();
|
|
1312
1499
|
const roundedMinutes = Math.round(minutes / timePickerIncrement) * timePickerIncrement;
|
|
@@ -1330,11 +1517,20 @@ class NgxDatexCalendarService {
|
|
|
1330
1517
|
}
|
|
1331
1518
|
return newStartDate;
|
|
1332
1519
|
}
|
|
1333
|
-
setEndDate(endDate, startDate, maxDate, maxSpan, timePicker, timePickerIncrement) {
|
|
1520
|
+
setEndDate(endDate, startDate, maxDate, maxSpan, timePicker, timePickerIncrement, currentEndDate) {
|
|
1334
1521
|
let newEndDate = new Date(endDate);
|
|
1335
1522
|
if (!timePicker) {
|
|
1336
1523
|
newEndDate = endOfDay(newEndDate);
|
|
1337
1524
|
}
|
|
1525
|
+
else if (currentEndDate && timePicker) {
|
|
1526
|
+
// When timePicker is enabled, preserve existing time if only date is changing
|
|
1527
|
+
if (newEndDate.getFullYear() !== currentEndDate.getFullYear() ||
|
|
1528
|
+
newEndDate.getMonth() !== currentEndDate.getMonth() ||
|
|
1529
|
+
newEndDate.getDate() !== currentEndDate.getDate()) {
|
|
1530
|
+
// Only date changed, preserve time
|
|
1531
|
+
newEndDate.setHours(currentEndDate.getHours(), currentEndDate.getMinutes(), currentEndDate.getSeconds(), currentEndDate.getMilliseconds());
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1338
1534
|
if (timePicker && timePickerIncrement) {
|
|
1339
1535
|
const minutes = newEndDate.getMinutes();
|
|
1340
1536
|
const roundedMinutes = Math.round(minutes / timePickerIncrement) * timePickerIncrement;
|
|
@@ -1533,28 +1729,165 @@ class NgxDatex {
|
|
|
1533
1729
|
* @example
|
|
1534
1730
|
* ```typescript
|
|
1535
1731
|
* const config: NgxDatexConfig = {
|
|
1536
|
-
* dateFormat: 'DD/MM/YYYY',
|
|
1537
1732
|
* firstDayOfWeek: 1,
|
|
1538
|
-
* businessDaysOnly: true
|
|
1733
|
+
* businessDaysOnly: true,
|
|
1734
|
+
* showWeekNumbers: true
|
|
1539
1735
|
* };
|
|
1540
1736
|
* ```
|
|
1541
1737
|
*/
|
|
1542
1738
|
config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
1543
1739
|
/**
|
|
1544
1740
|
* Localization settings for internationalization.
|
|
1545
|
-
* Controls language, date formats, and
|
|
1741
|
+
* Controls language, date formats, UI text, and regional preferences.
|
|
1742
|
+
*
|
|
1743
|
+
* This is the primary configuration for adapting the date picker to different
|
|
1744
|
+
* languages, regions, and cultural conventions. The most important property
|
|
1745
|
+
* is `format`, which controls how dates are displayed and parsed.
|
|
1546
1746
|
*
|
|
1547
1747
|
* @default SPANISH_LOCALE
|
|
1548
1748
|
*
|
|
1549
|
-
*
|
|
1749
|
+
* ## Key Properties:
|
|
1750
|
+
*
|
|
1751
|
+
* - **`format`**: Date format string (REQUIRED for timePicker usage)
|
|
1752
|
+
* - **`locale`**: Locale code for @formkit/tempo formatting
|
|
1753
|
+
* - **`separator`**: Text between start and end dates
|
|
1754
|
+
* - **`daysOfWeek`**: Short day names array
|
|
1755
|
+
* - **`monthNames`**: Full month names array
|
|
1756
|
+
* - **`applyLabel`**: Apply button text
|
|
1757
|
+
* - **`cancelLabel`**: Cancel button text
|
|
1758
|
+
*
|
|
1759
|
+
* ## Format Examples:
|
|
1760
|
+
*
|
|
1761
|
+
* ### Date Only Formats:
|
|
1550
1762
|
* ```typescript
|
|
1763
|
+
* // European format (DD/MM/YYYY)
|
|
1764
|
+
* const europeanLocale: NgxDatexLocale = {
|
|
1765
|
+
* locale: 'es-ES',
|
|
1766
|
+
* format: 'DD/MM/YYYY', // 15/01/2024
|
|
1767
|
+
* separator: ' - ',
|
|
1768
|
+
* daysOfWeek: ['Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa', 'Do'],
|
|
1769
|
+
* monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
|
|
1770
|
+
* 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
|
|
1771
|
+
* applyLabel: 'Aplicar',
|
|
1772
|
+
* cancelLabel: 'Cancelar',
|
|
1773
|
+
* firstDay: 1 // Monday first
|
|
1774
|
+
* };
|
|
1775
|
+
*
|
|
1776
|
+
* // US format (MM/DD/YYYY)
|
|
1777
|
+
* const usLocale: NgxDatexLocale = {
|
|
1778
|
+
* locale: 'en-US',
|
|
1779
|
+
* format: 'MM/DD/YYYY', // 01/15/2024
|
|
1780
|
+
* separator: ' - ',
|
|
1781
|
+
* daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
1782
|
+
* monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
1783
|
+
* 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
1784
|
+
* applyLabel: 'Apply',
|
|
1785
|
+
* cancelLabel: 'Cancel',
|
|
1786
|
+
* firstDay: 0 // Sunday first
|
|
1787
|
+
* };
|
|
1788
|
+
*
|
|
1789
|
+
* // ISO format (YYYY-MM-DD)
|
|
1790
|
+
* const isoLocale: NgxDatexLocale = {
|
|
1791
|
+
* locale: 'en-US',
|
|
1792
|
+
* format: 'YYYY-MM-DD', // 2024-01-15
|
|
1793
|
+
* separator: ' / ',
|
|
1794
|
+
* daysOfWeek: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
|
|
1795
|
+
* monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
1796
|
+
* 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
1797
|
+
* applyLabel: 'Apply',
|
|
1798
|
+
* cancelLabel: 'Cancel',
|
|
1799
|
+
* firstDay: 1 // Monday first
|
|
1800
|
+
* };
|
|
1801
|
+
* ```
|
|
1802
|
+
*
|
|
1803
|
+
* ### Time Picker Formats:
|
|
1804
|
+
* ```typescript
|
|
1805
|
+
* // Spanish with 24-hour time
|
|
1806
|
+
* const spanishWithTime: NgxDatexLocale = {
|
|
1807
|
+
* locale: 'es-ES',
|
|
1808
|
+
* format: 'DD/MM/YYYY HH:mm', // 15/01/2024 14:30
|
|
1809
|
+
* separator: ' - ',
|
|
1810
|
+
* daysOfWeek: ['Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa', 'Do'],
|
|
1811
|
+
* monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
|
|
1812
|
+
* 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
|
|
1813
|
+
* applyLabel: 'Aplicar',
|
|
1814
|
+
* cancelLabel: 'Cancelar'
|
|
1815
|
+
* };
|
|
1816
|
+
*
|
|
1817
|
+
* // US with 12-hour time
|
|
1818
|
+
* const usWithTime: NgxDatexLocale = {
|
|
1819
|
+
* locale: 'en-US',
|
|
1820
|
+
* format: 'MM/DD/YYYY hh:mm A', // 01/15/2024 02:30 PM
|
|
1821
|
+
* separator: ' - ',
|
|
1822
|
+
* daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
1823
|
+
* monthNames: ['January', 'February', 'March', 'April', 'May', 'June',
|
|
1824
|
+
* 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
1825
|
+
* applyLabel: 'Apply',
|
|
1826
|
+
* cancelLabel: 'Cancel'
|
|
1827
|
+
* };
|
|
1828
|
+
*
|
|
1829
|
+
* // French locale
|
|
1551
1830
|
* const frenchLocale: NgxDatexLocale = {
|
|
1831
|
+
* locale: 'fr-FR',
|
|
1552
1832
|
* format: 'DD/MM/YYYY',
|
|
1833
|
+
* separator: ' au ',
|
|
1553
1834
|
* daysOfWeek: ['Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa', 'Di'],
|
|
1835
|
+
* monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
|
|
1836
|
+
* 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
|
|
1554
1837
|
* applyLabel: 'Appliquer',
|
|
1555
|
-
* cancelLabel: 'Annuler'
|
|
1838
|
+
* cancelLabel: 'Annuler',
|
|
1839
|
+
* customRangeLabel: 'Plage personnalisée',
|
|
1840
|
+
* firstDay: 1
|
|
1556
1841
|
* };
|
|
1842
|
+
*
|
|
1843
|
+
* // German locale
|
|
1844
|
+
* const germanLocale: NgxDatexLocale = {
|
|
1845
|
+
* locale: 'de-DE',
|
|
1846
|
+
* format: 'DD.MM.YYYY',
|
|
1847
|
+
* separator: ' bis ',
|
|
1848
|
+
* daysOfWeek: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],
|
|
1849
|
+
* monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
|
|
1850
|
+
* 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
|
|
1851
|
+
* applyLabel: 'Anwenden',
|
|
1852
|
+
* cancelLabel: 'Abbrechen',
|
|
1853
|
+
* customRangeLabel: 'Benutzerdefiniert',
|
|
1854
|
+
* firstDay: 1
|
|
1855
|
+
* };
|
|
1856
|
+
* ```
|
|
1857
|
+
*
|
|
1858
|
+
* ## Component Usage:
|
|
1859
|
+
* ```html
|
|
1860
|
+
* <!-- Spanish date picker -->
|
|
1861
|
+
* <ngx-datex [locale]="spanishLocale"></ngx-datex>
|
|
1862
|
+
*
|
|
1863
|
+
* <!-- US date picker with time -->
|
|
1864
|
+
* <ngx-datex
|
|
1865
|
+
* [locale]="usWithTime"
|
|
1866
|
+
* [timePicker]="true"
|
|
1867
|
+
* [timePicker24Hour]="false">
|
|
1868
|
+
* </ngx-datex>
|
|
1869
|
+
*
|
|
1870
|
+
* <!-- French date picker -->
|
|
1871
|
+
* <ngx-datex [locale]="frenchLocale"></ngx-datex>
|
|
1872
|
+
*
|
|
1873
|
+
* <!-- Using predefined locales -->
|
|
1874
|
+
* <ngx-datex [locale]="SPANISH_LOCALE"></ngx-datex>
|
|
1875
|
+
* <ngx-datex [locale]="US_ENGLISH_LOCALE"></ngx-datex>
|
|
1876
|
+
* <ngx-datex [locale]="SPANISH_LOCALE_WITH_TIME"></ngx-datex>
|
|
1557
1877
|
* ```
|
|
1878
|
+
*
|
|
1879
|
+
* ## Important Notes:
|
|
1880
|
+
*
|
|
1881
|
+
* 1. **TimePicker Format**: When `timePicker=true`, you MUST include time tokens in the format
|
|
1882
|
+
* 2. **Locale Code**: The `locale` property affects @formkit/tempo formatting behavior
|
|
1883
|
+
* 3. **Day Order**: `daysOfWeek` array should match your `firstDay` setting
|
|
1884
|
+
* 4. **Separator**: Used between start and end dates in range display
|
|
1885
|
+
* 5. **Predefined Locales**: Use exported constants like `SPANISH_LOCALE`, `US_ENGLISH_LOCALE`
|
|
1886
|
+
*
|
|
1887
|
+
* @see {@link NgxDatexLocale} for complete interface documentation
|
|
1888
|
+
* @see {@link SPANISH_LOCALE} for default Spanish configuration
|
|
1889
|
+
* @see {@link US_ENGLISH_LOCALE} for US English configuration
|
|
1890
|
+
* @see {@link SPANISH_LOCALE_WITH_TIME} for Spanish with time support
|
|
1558
1891
|
*/
|
|
1559
1892
|
locale = input(SPANISH_LOCALE, ...(ngDevMode ? [{ debugName: "locale" }] : []));
|
|
1560
1893
|
/**
|
|
@@ -1663,6 +1996,18 @@ class NgxDatex {
|
|
|
1663
1996
|
* ```
|
|
1664
1997
|
*/
|
|
1665
1998
|
showCheckbox = input(false, ...(ngDevMode ? [{ debugName: "showCheckbox" }] : []));
|
|
1999
|
+
/**
|
|
2000
|
+
* Initial checked state of the checkbox.
|
|
2001
|
+
* Only applies when showCheckbox is true.
|
|
2002
|
+
*
|
|
2003
|
+
* @default false
|
|
2004
|
+
*
|
|
2005
|
+
* @example
|
|
2006
|
+
* ```html
|
|
2007
|
+
* <ngx-datex [showCheckbox]="true" [checkboxChecked]="true"></ngx-datex>
|
|
2008
|
+
* ```
|
|
2009
|
+
*/
|
|
2010
|
+
checkboxChecked = input(false, ...(ngDevMode ? [{ debugName: "checkboxChecked" }] : []));
|
|
1666
2011
|
/**
|
|
1667
2012
|
* Position of the checkbox relative to the input.
|
|
1668
2013
|
*
|
|
@@ -2574,17 +2919,18 @@ class NgxDatex {
|
|
|
2574
2919
|
const endDate = this.currentEndDate;
|
|
2575
2920
|
if (!startDate)
|
|
2576
2921
|
return '';
|
|
2577
|
-
const
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2580
|
-
|
|
2922
|
+
const locale = this.locale();
|
|
2923
|
+
const format = locale.format || 'DD/MM/YYYY';
|
|
2924
|
+
// Following vanilla-daterangepicker: ALWAYS use locale.format as-is
|
|
2925
|
+
// User must configure format to include time if timePicker is enabled
|
|
2926
|
+
const start = formatDateValue(startDate, format, locale.locale);
|
|
2581
2927
|
if (this.singleDatePicker()) {
|
|
2582
2928
|
return start;
|
|
2583
2929
|
}
|
|
2584
2930
|
if (!endDate) {
|
|
2585
2931
|
return start;
|
|
2586
2932
|
}
|
|
2587
|
-
const end = formatDateValue(endDate,
|
|
2933
|
+
const end = formatDateValue(endDate, format, locale.locale);
|
|
2588
2934
|
return `${start} - ${end}`;
|
|
2589
2935
|
}, ...(ngDevMode ? [{ debugName: "formattedSelectedRange" }] : []));
|
|
2590
2936
|
// Current label for selected range
|
|
@@ -2597,15 +2943,16 @@ class NgxDatex {
|
|
|
2597
2943
|
return '';
|
|
2598
2944
|
let customRange = true;
|
|
2599
2945
|
const ranges = this.ranges();
|
|
2946
|
+
const locale = this.locale();
|
|
2600
2947
|
for (const [label, [rangeStart, rangeEnd]] of Object.entries(ranges)) {
|
|
2601
2948
|
let startMatches;
|
|
2602
2949
|
let endMatches;
|
|
2603
2950
|
if (this.timePicker()) {
|
|
2604
2951
|
const format = this.timePickerSeconds() ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm';
|
|
2605
|
-
const startFormatted = formatDateValue(startDate, format);
|
|
2606
|
-
const endFormatted = formatDateValue(endDate, format);
|
|
2607
|
-
const rangeStartFormatted = formatDateValue(rangeStart, format);
|
|
2608
|
-
const rangeEndFormatted = formatDateValue(rangeEnd, format);
|
|
2952
|
+
const startFormatted = formatDateValue(startDate, format, locale.locale);
|
|
2953
|
+
const endFormatted = formatDateValue(endDate, format, locale.locale);
|
|
2954
|
+
const rangeStartFormatted = formatDateValue(rangeStart, format, locale.locale);
|
|
2955
|
+
const rangeEndFormatted = formatDateValue(rangeEnd, format, locale.locale);
|
|
2609
2956
|
startMatches = startFormatted === rangeStartFormatted;
|
|
2610
2957
|
endMatches = endFormatted === rangeEndFormatted;
|
|
2611
2958
|
}
|
|
@@ -2619,7 +2966,7 @@ class NgxDatex {
|
|
|
2619
2966
|
}
|
|
2620
2967
|
}
|
|
2621
2968
|
if (customRange) {
|
|
2622
|
-
return
|
|
2969
|
+
return locale.customRangeLabel || 'Rango Personalizado';
|
|
2623
2970
|
}
|
|
2624
2971
|
return '';
|
|
2625
2972
|
}, ...(ngDevMode ? [{ debugName: "currentLabel" }] : []));
|
|
@@ -2629,15 +2976,16 @@ class NgxDatex {
|
|
|
2629
2976
|
if (!startDate || !endDate)
|
|
2630
2977
|
return false;
|
|
2631
2978
|
const ranges = this.ranges();
|
|
2979
|
+
const locale = this.locale();
|
|
2632
2980
|
for (const [rangeStart, rangeEnd] of Object.values(ranges)) {
|
|
2633
2981
|
let startMatches;
|
|
2634
2982
|
let endMatches;
|
|
2635
2983
|
if (this.timePicker()) {
|
|
2636
2984
|
const format = this.timePickerSeconds() ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm';
|
|
2637
|
-
const startFormatted = formatDateValue(startDate, format);
|
|
2638
|
-
const endFormatted = formatDateValue(endDate, format);
|
|
2639
|
-
const rangeStartFormatted = formatDateValue(rangeStart, format);
|
|
2640
|
-
const rangeEndFormatted = formatDateValue(rangeEnd, format);
|
|
2985
|
+
const startFormatted = formatDateValue(startDate, format, locale.locale);
|
|
2986
|
+
const endFormatted = formatDateValue(endDate, format, locale.locale);
|
|
2987
|
+
const rangeStartFormatted = formatDateValue(rangeStart, format, locale.locale);
|
|
2988
|
+
const rangeEndFormatted = formatDateValue(rangeEnd, format, locale.locale);
|
|
2641
2989
|
startMatches = startFormatted === rangeStartFormatted;
|
|
2642
2990
|
endMatches = endFormatted === rangeEndFormatted;
|
|
2643
2991
|
}
|
|
@@ -2707,10 +3055,14 @@ class NgxDatex {
|
|
|
2707
3055
|
this.currentStartDate = new Date(value.startDate);
|
|
2708
3056
|
this.currentEndDate = value.endDate ? new Date(value.endDate) : null;
|
|
2709
3057
|
this._currentValue.set(value);
|
|
3058
|
+
// Initialize old values for change tracking
|
|
3059
|
+
this.oldStartDate = new Date(this.currentStartDate);
|
|
3060
|
+
this.oldEndDate = this.currentEndDate ? new Date(this.currentEndDate) : null;
|
|
2710
3061
|
if (value.startDate) {
|
|
2711
3062
|
this.updateMonthsInView();
|
|
2712
3063
|
}
|
|
2713
3064
|
if (this.timePicker()) {
|
|
3065
|
+
// Always update time signals from the provided dates to ensure sync
|
|
2714
3066
|
this.updateTimeSignalsFromDate(value.startDate, 'start');
|
|
2715
3067
|
if (value.endDate) {
|
|
2716
3068
|
this.updateTimeSignalsFromDate(value.endDate, 'end');
|
|
@@ -2771,12 +3123,13 @@ class NgxDatex {
|
|
|
2771
3123
|
openCalendar() {
|
|
2772
3124
|
if (this.disabled() || this.readonly() || this._isOpen())
|
|
2773
3125
|
return;
|
|
2774
|
-
// Save old values for potential cancellation
|
|
3126
|
+
// Save old values for potential cancellation (following vanilla daterangepicker)
|
|
2775
3127
|
this.oldStartDate = new Date(this.currentStartDate);
|
|
2776
3128
|
this.oldEndDate = this.currentEndDate ? new Date(this.currentEndDate) : null;
|
|
2777
3129
|
this.previousRightTime = this.currentEndDate ? new Date(this.currentEndDate) : null;
|
|
2778
3130
|
this.createOverlay();
|
|
2779
3131
|
this._isOpen.set(true);
|
|
3132
|
+
// Sync time signals with current dates when opening (don't modify the dates)
|
|
2780
3133
|
if (this.timePicker()) {
|
|
2781
3134
|
this.updateTimeSignalsFromDate(this.currentStartDate, 'start');
|
|
2782
3135
|
if (this.currentEndDate) {
|
|
@@ -2799,22 +3152,33 @@ class NgxDatex {
|
|
|
2799
3152
|
closeCalendar() {
|
|
2800
3153
|
this._isOpen.set(false);
|
|
2801
3154
|
this._hoverDate.set(null);
|
|
2802
|
-
// Handle incomplete selection
|
|
3155
|
+
// Handle incomplete selection (following vanilla daterangepicker logic)
|
|
2803
3156
|
if (!this.currentEndDate && this.oldStartDate && this.oldEndDate) {
|
|
2804
3157
|
this.currentStartDate = this.oldStartDate;
|
|
2805
3158
|
this.currentEndDate = this.oldEndDate;
|
|
2806
3159
|
this.updateCurrentValue();
|
|
2807
3160
|
}
|
|
3161
|
+
// Note: Do NOT emit dateChange here - it should only be emitted via apply() or autoApply
|
|
3162
|
+
// This prevents double emission when apply() -> closeCalendar() is called
|
|
3163
|
+
this.updateElement();
|
|
3164
|
+
this.overlayService.closeOverlay();
|
|
3165
|
+
this.closeEvent.emit();
|
|
3166
|
+
}
|
|
3167
|
+
/**
|
|
3168
|
+
* Closes the calendar and checks for pending changes to emit.
|
|
3169
|
+
* Used when calendar is closed without explicit apply (ESC, click outside, etc.)
|
|
3170
|
+
*/
|
|
3171
|
+
closeCalendarWithChangeCheck() {
|
|
3172
|
+
// Check for changes using appropriate precision based on timePicker
|
|
2808
3173
|
if (this.oldStartDate && this.oldEndDate) {
|
|
2809
|
-
const
|
|
2810
|
-
|
|
3174
|
+
const precision = this.timePicker() ? 'minute' : 'day';
|
|
3175
|
+
const hasChanges = !isSameDate(this.currentStartDate, this.oldStartDate, precision) ||
|
|
3176
|
+
(this.currentEndDate && !isSameDate(this.currentEndDate, this.oldEndDate, precision));
|
|
2811
3177
|
if (hasChanges && this.currentEndDate) {
|
|
2812
3178
|
this.emitValueChange();
|
|
2813
3179
|
}
|
|
2814
3180
|
}
|
|
2815
|
-
this.
|
|
2816
|
-
this.overlayService.closeOverlay();
|
|
2817
|
-
this.closeEvent.emit();
|
|
3181
|
+
this.closeCalendar();
|
|
2818
3182
|
}
|
|
2819
3183
|
/**
|
|
2820
3184
|
* Applies the current selection and closes the calendar.
|
|
@@ -2831,6 +3195,34 @@ class NgxDatex {
|
|
|
2831
3195
|
apply() {
|
|
2832
3196
|
if (!this.canApplyValue())
|
|
2833
3197
|
return;
|
|
3198
|
+
// Ensure time values are applied to the dates before closing
|
|
3199
|
+
if (this.timePicker()) {
|
|
3200
|
+
const startTime = this._startTime();
|
|
3201
|
+
const endTime = this._endTime();
|
|
3202
|
+
// Apply start time
|
|
3203
|
+
let startHour = startTime.hour;
|
|
3204
|
+
if (!this.timePicker24Hour()) {
|
|
3205
|
+
if (startTime.ampm === 'PM' && startHour < 12)
|
|
3206
|
+
startHour += 12;
|
|
3207
|
+
if (startTime.ampm === 'AM' && startHour === 12)
|
|
3208
|
+
startHour = 0;
|
|
3209
|
+
}
|
|
3210
|
+
this.currentStartDate.setHours(startHour, startTime.minute, 0, 0);
|
|
3211
|
+
// Apply end time if exists
|
|
3212
|
+
if (this.currentEndDate) {
|
|
3213
|
+
let endHour = endTime.hour;
|
|
3214
|
+
if (!this.timePicker24Hour()) {
|
|
3215
|
+
if (endTime.ampm === 'PM' && endHour < 12)
|
|
3216
|
+
endHour += 12;
|
|
3217
|
+
if (endTime.ampm === 'AM' && endHour === 12)
|
|
3218
|
+
endHour = 0;
|
|
3219
|
+
}
|
|
3220
|
+
this.currentEndDate.setHours(endHour, endTime.minute, 0, 0);
|
|
3221
|
+
}
|
|
3222
|
+
this.updateCurrentValue();
|
|
3223
|
+
}
|
|
3224
|
+
// Emit value change when applying (following vanilla daterangepicker behavior)
|
|
3225
|
+
this.emitValueChange();
|
|
2834
3226
|
this.updateElement();
|
|
2835
3227
|
this.closeCalendar();
|
|
2836
3228
|
}
|
|
@@ -2948,16 +3340,62 @@ class NgxDatex {
|
|
|
2948
3340
|
const range = ranges[label];
|
|
2949
3341
|
if (!range)
|
|
2950
3342
|
return;
|
|
3343
|
+
const locale = this.locale();
|
|
3344
|
+
// Handle custom range selection (following vanilla daterangepicker logic)
|
|
3345
|
+
if (label === (locale.customRangeLabel || 'Rango Personalizado')) {
|
|
3346
|
+
this.selectCustomRange();
|
|
3347
|
+
return;
|
|
3348
|
+
}
|
|
2951
3349
|
const [rangeStart, rangeEnd] = range;
|
|
2952
|
-
this.
|
|
2953
|
-
|
|
3350
|
+
if (this.timePicker()) {
|
|
3351
|
+
// When timePicker is enabled, preserve the exact time from the range
|
|
3352
|
+
this.currentStartDate = new Date(rangeStart);
|
|
3353
|
+
this.currentEndDate = new Date(rangeEnd);
|
|
3354
|
+
// Update time signals to match the selected range
|
|
3355
|
+
this.updateTimeSignalsFromDate(this.currentStartDate, 'start');
|
|
3356
|
+
this.updateTimeSignalsFromDate(this.currentEndDate, 'end');
|
|
3357
|
+
}
|
|
3358
|
+
else {
|
|
3359
|
+
// When timePicker is disabled, use start/end of day (following vanilla daterangepicker)
|
|
3360
|
+
this.currentStartDate = startOfDay(new Date(rangeStart));
|
|
3361
|
+
this.currentEndDate = endOfDay(new Date(rangeEnd));
|
|
3362
|
+
}
|
|
2954
3363
|
this.updateCurrentValue();
|
|
2955
3364
|
this.updateMonthsInView();
|
|
3365
|
+
// Following vanilla daterangepicker: predefined ranges always auto-apply
|
|
3366
|
+
// regardless of autoApply setting (except custom range)
|
|
2956
3367
|
this.apply();
|
|
2957
3368
|
}
|
|
2958
3369
|
selectCustomRange() {
|
|
2959
3370
|
// Custom range selection logic - mainly visual
|
|
2960
3371
|
}
|
|
3372
|
+
/**
|
|
3373
|
+
* Gets the current checkbox state.
|
|
3374
|
+
*
|
|
3375
|
+
* @returns Current checkbox checked state
|
|
3376
|
+
*
|
|
3377
|
+
* @example
|
|
3378
|
+
* ```typescript
|
|
3379
|
+
* const isChecked = this.datePicker.getCheckboxValue();
|
|
3380
|
+
* ```
|
|
3381
|
+
*/
|
|
3382
|
+
getCheckboxValue() {
|
|
3383
|
+
return this._checkboxValue();
|
|
3384
|
+
}
|
|
3385
|
+
/**
|
|
3386
|
+
* Sets the checkbox state programmatically.
|
|
3387
|
+
*
|
|
3388
|
+
* @param checked - New checkbox state
|
|
3389
|
+
*
|
|
3390
|
+
* @example
|
|
3391
|
+
* ```typescript
|
|
3392
|
+
* this.datePicker.setCheckboxValue(true);
|
|
3393
|
+
* ```
|
|
3394
|
+
*/
|
|
3395
|
+
setCheckboxValue(checked) {
|
|
3396
|
+
this._checkboxValue.set(checked);
|
|
3397
|
+
this.checkboxChange.emit(checked);
|
|
3398
|
+
}
|
|
2961
3399
|
// Event handlers
|
|
2962
3400
|
onInputClick() {
|
|
2963
3401
|
if (this.readonly())
|
|
@@ -2975,6 +3413,18 @@ class NgxDatex {
|
|
|
2975
3413
|
onInputBlur() {
|
|
2976
3414
|
this._inputFocused.set(false);
|
|
2977
3415
|
this.elementChanged();
|
|
3416
|
+
// Following vanilla daterangepicker: check if there were actual changes
|
|
3417
|
+
// and emit dateChange only if autoApply is enabled and values actually changed
|
|
3418
|
+
if (this.effectiveAutoApply() && this.oldStartDate && this.oldEndDate) {
|
|
3419
|
+
const precision = this.timePicker() ? 'minute' : 'day';
|
|
3420
|
+
const hasChanges = !isSameDate(this.currentStartDate, this.oldStartDate, precision) ||
|
|
3421
|
+
(this.currentEndDate && !isSameDate(this.currentEndDate, this.oldEndDate, precision));
|
|
3422
|
+
if (hasChanges && this.currentEndDate && !this._isOpen()) {
|
|
3423
|
+
// Only emit if autoApply is enabled, there are actual changes, and calendar is closed
|
|
3424
|
+
this.emitValueChange();
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
this.onTouched();
|
|
2978
3428
|
}
|
|
2979
3429
|
onInputKeydown(event) {
|
|
2980
3430
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
@@ -2983,12 +3433,12 @@ class NgxDatex {
|
|
|
2983
3433
|
}
|
|
2984
3434
|
else if (event.key === 'Escape') {
|
|
2985
3435
|
if (!this._inputFocused() || (this._inputFocused() && this._isOpen())) {
|
|
2986
|
-
this.
|
|
3436
|
+
this.closeCalendarWithChangeCheck();
|
|
2987
3437
|
}
|
|
2988
3438
|
}
|
|
2989
3439
|
else if (event.key === 'Tab' || event.key === 'Enter') {
|
|
2990
3440
|
if (this._isOpen()) {
|
|
2991
|
-
this.
|
|
3441
|
+
this.closeCalendarWithChangeCheck();
|
|
2992
3442
|
}
|
|
2993
3443
|
}
|
|
2994
3444
|
}
|
|
@@ -3008,7 +3458,7 @@ class NgxDatex {
|
|
|
3008
3458
|
}
|
|
3009
3459
|
onCalendarKeydown(event) {
|
|
3010
3460
|
if (event.key === 'Escape' && !this._inputFocused()) {
|
|
3011
|
-
this.
|
|
3461
|
+
this.closeCalendarWithChangeCheck();
|
|
3012
3462
|
}
|
|
3013
3463
|
}
|
|
3014
3464
|
onCheckboxChange(checked) {
|
|
@@ -3288,32 +3738,74 @@ class NgxDatex {
|
|
|
3288
3738
|
else {
|
|
3289
3739
|
this.initializeWithInputDates(inputStartDate, inputEndDate);
|
|
3290
3740
|
}
|
|
3741
|
+
// Initialize old values for change tracking
|
|
3742
|
+
this.oldStartDate = new Date(this.currentStartDate);
|
|
3743
|
+
this.oldEndDate = this.currentEndDate ? new Date(this.currentEndDate) : null;
|
|
3744
|
+
// Initialize checkbox state from input
|
|
3745
|
+
this._checkboxValue.set(this.checkboxChecked());
|
|
3291
3746
|
this.datexService.updateConfig(this.config());
|
|
3292
3747
|
this.datexService.setLocale(this.locale());
|
|
3293
3748
|
this.updateElement();
|
|
3294
3749
|
}
|
|
3295
3750
|
initializeDefaultDates() {
|
|
3296
3751
|
const today = new Date();
|
|
3752
|
+
// Following vanilla daterangepicker: always start with startOf/endOf day
|
|
3753
|
+
// moment().startOf('day') = 00:00:00
|
|
3754
|
+
// moment().endOf('day') = 23:59:59
|
|
3297
3755
|
const startDate = startOfDay(today);
|
|
3298
3756
|
const endDate = this.singleDatePicker() ? startOfDay(today) : endOfDay(today);
|
|
3757
|
+
// When timePicker is enabled, preserve these default times
|
|
3758
|
+
// (vanilla daterangepicker doesn't modify them when timePicker=true)
|
|
3759
|
+
if (this.timePicker()) {
|
|
3760
|
+
// Initialize time signals from the default dates
|
|
3761
|
+
this.updateTimeSignalsFromDate(startDate, 'start');
|
|
3762
|
+
if (endDate) {
|
|
3763
|
+
this.updateTimeSignalsFromDate(endDate, 'end');
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3299
3766
|
this.currentStartDate = startDate;
|
|
3300
3767
|
this.currentEndDate = endDate;
|
|
3301
3768
|
this.initializeCalendars(startDate, endDate);
|
|
3302
3769
|
this.updateCurrentValue();
|
|
3303
|
-
if (this.timePicker()) {
|
|
3304
|
-
this.updateTimeSignalsFromDate(today, 'start');
|
|
3305
|
-
this.updateTimeSignalsFromDate(today, 'end');
|
|
3306
|
-
}
|
|
3307
3770
|
}
|
|
3308
3771
|
initializeWithInputDates(inputStartDate, inputEndDate) {
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3772
|
+
let startDate;
|
|
3773
|
+
let endDate;
|
|
3774
|
+
if (this.timePicker()) {
|
|
3775
|
+
// When timePicker is enabled, preserve the full date-time or use appropriate defaults
|
|
3776
|
+
if (inputStartDate) {
|
|
3777
|
+
startDate = new Date(inputStartDate);
|
|
3778
|
+
// If the input date doesn't have specific time (is at 00:00:00), keep it as is
|
|
3779
|
+
// Otherwise preserve the provided time
|
|
3780
|
+
}
|
|
3781
|
+
else {
|
|
3782
|
+
startDate = new Date();
|
|
3783
|
+
startDate.setHours(0, 0, 0, 0); // Default start time: 00:00
|
|
3784
|
+
}
|
|
3785
|
+
if (this.singleDatePicker()) {
|
|
3786
|
+
endDate = new Date(startDate);
|
|
3787
|
+
}
|
|
3788
|
+
else if (inputEndDate) {
|
|
3789
|
+
endDate = new Date(inputEndDate);
|
|
3790
|
+
// If the input end date doesn't have specific time (is at 00:00:00), set to end of day
|
|
3791
|
+
if (endDate.getHours() === 0 && endDate.getMinutes() === 0 && endDate.getSeconds() === 0) {
|
|
3792
|
+
endDate.setHours(23, 59, 0, 0);
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3795
|
+
else {
|
|
3796
|
+
endDate = new Date(startDate);
|
|
3797
|
+
endDate.setHours(23, 59, 0, 0); // Default end time: 23:59
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
else {
|
|
3801
|
+
// When timePicker is disabled, use start/end of day
|
|
3802
|
+
startDate = inputStartDate ? startOfDay(new Date(inputStartDate)) : startOfDay(new Date());
|
|
3803
|
+
endDate = this.singleDatePicker()
|
|
3804
|
+
? new Date(startDate)
|
|
3805
|
+
: inputEndDate
|
|
3806
|
+
? endOfDay(new Date(inputEndDate))
|
|
3807
|
+
: endOfDay(startDate);
|
|
3808
|
+
}
|
|
3317
3809
|
this.currentStartDate = startDate;
|
|
3318
3810
|
this.currentEndDate = endDate;
|
|
3319
3811
|
this.initializeCalendars(startDate, endDate);
|
|
@@ -3372,7 +3864,7 @@ class NgxDatex {
|
|
|
3372
3864
|
}
|
|
3373
3865
|
}
|
|
3374
3866
|
setStartDate(startDate) {
|
|
3375
|
-
const newStartDate = this.calendarService.setStartDate(startDate, this.minDate(), this.maxDate(), this.timePicker(), this.timePickerIncrement());
|
|
3867
|
+
const newStartDate = this.calendarService.setStartDate(startDate, this.minDate(), this.maxDate(), this.timePicker(), this.timePickerIncrement(), this.currentStartDate);
|
|
3376
3868
|
this.currentStartDate = newStartDate;
|
|
3377
3869
|
this.updateCurrentValue();
|
|
3378
3870
|
this.updateMonthsInView();
|
|
@@ -3381,7 +3873,7 @@ class NgxDatex {
|
|
|
3381
3873
|
}
|
|
3382
3874
|
}
|
|
3383
3875
|
setEndDate(endDate) {
|
|
3384
|
-
const newEndDate = this.calendarService.setEndDate(endDate, this.currentStartDate, this.maxDate(), this.maxSpan(), this.timePicker(), this.timePickerIncrement());
|
|
3876
|
+
const newEndDate = this.calendarService.setEndDate(endDate, this.currentStartDate, this.maxDate(), this.maxSpan(), this.timePicker(), this.timePickerIncrement(), this.currentEndDate);
|
|
3385
3877
|
this.previousRightTime = new Date(newEndDate);
|
|
3386
3878
|
this.currentEndDate = newEndDate;
|
|
3387
3879
|
this.updateCurrentValue();
|
|
@@ -3397,13 +3889,14 @@ class NgxDatex {
|
|
|
3397
3889
|
const endDate = this._internalEndDate;
|
|
3398
3890
|
if (!startDate)
|
|
3399
3891
|
return;
|
|
3400
|
-
const
|
|
3401
|
-
const
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3404
|
-
|
|
3892
|
+
const locale = this.locale();
|
|
3893
|
+
const format = locale.format || 'DD/MM/YYYY';
|
|
3894
|
+
const separator = locale.separator || ' - ';
|
|
3895
|
+
// Following vanilla-daterangepicker: ALWAYS use locale.format as-is
|
|
3896
|
+
// User must configure format to include time if timePicker is enabled
|
|
3897
|
+
let newValue = formatDateValue(startDate, format, locale.locale);
|
|
3405
3898
|
if (!this.singleDatePicker() && endDate) {
|
|
3406
|
-
newValue += separator + formatDateValue(endDate,
|
|
3899
|
+
newValue += separator + formatDateValue(endDate, format, locale.locale);
|
|
3407
3900
|
}
|
|
3408
3901
|
this._displayValue.set(newValue);
|
|
3409
3902
|
}
|
|
@@ -3428,6 +3921,9 @@ class NgxDatex {
|
|
|
3428
3921
|
endDate: this.currentEndDate,
|
|
3429
3922
|
});
|
|
3430
3923
|
}
|
|
3924
|
+
// Update old values after successful emission to track future changes
|
|
3925
|
+
this.oldStartDate = new Date(this.currentStartDate);
|
|
3926
|
+
this.oldEndDate = this.currentEndDate ? new Date(this.currentEndDate) : null;
|
|
3431
3927
|
}
|
|
3432
3928
|
updateView() {
|
|
3433
3929
|
if (this.timePicker()) {
|
|
@@ -3473,12 +3969,13 @@ class NgxDatex {
|
|
|
3473
3969
|
}
|
|
3474
3970
|
this._errorMessage.set('');
|
|
3475
3971
|
try {
|
|
3972
|
+
// Following vanilla daterangepicker: elementChanged only updates internal state
|
|
3973
|
+
// It does NOT emit change events - those are only emitted via apply()
|
|
3476
3974
|
this.setStartDate(start);
|
|
3477
3975
|
this.setEndDate(end);
|
|
3478
3976
|
this.updateView();
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
}
|
|
3977
|
+
// Do NOT emit dateChange here - following vanilla daterangepicker behavior
|
|
3978
|
+
// dateChange should only be emitted via apply() or autoApply scenarios
|
|
3482
3979
|
}
|
|
3483
3980
|
catch {
|
|
3484
3981
|
this._errorMessage.set('Fecha fuera del rango permitido');
|
|
@@ -3487,9 +3984,10 @@ class NgxDatex {
|
|
|
3487
3984
|
parseInputDate(dateStr) {
|
|
3488
3985
|
if (!dateStr)
|
|
3489
3986
|
return null;
|
|
3490
|
-
const
|
|
3987
|
+
const locale = this.locale();
|
|
3988
|
+
const format = locale.format || 'DD/MM/YYYY';
|
|
3491
3989
|
try {
|
|
3492
|
-
const date = parseDateValue(dateStr, format);
|
|
3990
|
+
const date = parseDateValue(dateStr, format, locale.locale);
|
|
3493
3991
|
if (isValidDate(date)) {
|
|
3494
3992
|
return date;
|
|
3495
3993
|
}
|
|
@@ -3504,14 +4002,14 @@ class NgxDatex {
|
|
|
3504
4002
|
}
|
|
3505
4003
|
}
|
|
3506
4004
|
createOverlay() {
|
|
3507
|
-
this.overlayService.createOverlay(this.inputElement, this.calendarTemplate, this.viewContainerRef, this.locale(), this.opens(), this.drops(), () => this.
|
|
4005
|
+
this.overlayService.createOverlay(this.inputElement, this.calendarTemplate, this.viewContainerRef, this.locale(), this.opens(), this.drops(), () => this.closeCalendarWithChangeCheck(), (event) => {
|
|
3508
4006
|
if (event.key === 'Escape' && !this._inputFocused()) {
|
|
3509
|
-
this.
|
|
4007
|
+
this.closeCalendarWithChangeCheck();
|
|
3510
4008
|
}
|
|
3511
4009
|
}, (position) => this._overlayPosition.set(position));
|
|
3512
4010
|
}
|
|
3513
4011
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxDatex, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3514
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxDatex, isStandalone: true, selector: "ngx-datex", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, calendarIcon: { classPropertyName: "calendarIcon", publicName: "calendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, calendarIconPosition: { classPropertyName: "calendarIconPosition", publicName: "calendarIconPosition", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, checkboxPosition: { classPropertyName: "checkboxPosition", publicName: "checkboxPosition", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, singleDatePicker: { classPropertyName: "singleDatePicker", publicName: "singleDatePicker", isSignal: true, isRequired: false, transformFunction: null }, autoApply: { classPropertyName: "autoApply", publicName: "autoApply", isSignal: true, isRequired: false, transformFunction: null }, showDropdowns: { classPropertyName: "showDropdowns", publicName: "showDropdowns", isSignal: true, isRequired: false, transformFunction: null }, timePicker: { classPropertyName: "timePicker", publicName: "timePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker24Hour: { classPropertyName: "timePicker24Hour", publicName: "timePicker24Hour", isSignal: true, isRequired: false, transformFunction: null }, timePickerIncrement: { classPropertyName: "timePickerIncrement", publicName: "timePickerIncrement", isSignal: true, isRequired: false, transformFunction: null }, timePickerSeconds: { classPropertyName: "timePickerSeconds", publicName: "timePickerSeconds", isSignal: true, isRequired: false, transformFunction: null }, linkedCalendars: { classPropertyName: "linkedCalendars", publicName: "linkedCalendars", isSignal: true, isRequired: false, transformFunction: null }, autoUpdateInput: { classPropertyName: "autoUpdateInput", publicName: "autoUpdateInput", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowCalendars: { classPropertyName: "alwaysShowCalendars", publicName: "alwaysShowCalendars", isSignal: true, isRequired: false, transformFunction: null }, showCustomRangeLabel: { classPropertyName: "showCustomRangeLabel", publicName: "showCustomRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, maxSpan: { classPropertyName: "maxSpan", publicName: "maxSpan", isSignal: true, isRequired: false, transformFunction: null }, showWeekNumbers: { classPropertyName: "showWeekNumbers", publicName: "showWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, showISOWeekNumbers: { classPropertyName: "showISOWeekNumbers", publicName: "showISOWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, buttonClasses: { classPropertyName: "buttonClasses", publicName: "buttonClasses", isSignal: true, isRequired: false, transformFunction: null }, applyButtonClasses: { classPropertyName: "applyButtonClasses", publicName: "applyButtonClasses", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonClasses: { classPropertyName: "cancelButtonClasses", publicName: "cancelButtonClasses", isSignal: true, isRequired: false, transformFunction: null }, isInvalidDate: { classPropertyName: "isInvalidDate", publicName: "isInvalidDate", isSignal: true, isRequired: false, transformFunction: null }, isCustomDate: { classPropertyName: "isCustomDate", publicName: "isCustomDate", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, ranges: { classPropertyName: "ranges", publicName: "ranges", isSignal: true, isRequired: false, transformFunction: null }, opens: { classPropertyName: "opens", publicName: "opens", isSignal: true, isRequired: false, transformFunction: null }, drops: { classPropertyName: "drops", publicName: "drops", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null }, dayTemplate: { classPropertyName: "dayTemplate", publicName: "dayTemplate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange", openEvent: "openEvent", closeEvent: "closeEvent", monthChange: "monthChange", yearChange: "yearChange", dateHover: "dateHover", validationError: "validationError", checkboxChange: "checkboxChange" }, providers: [
|
|
4012
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: NgxDatex, isStandalone: true, selector: "ngx-datex", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, calendarIcon: { classPropertyName: "calendarIcon", publicName: "calendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, calendarIconPosition: { classPropertyName: "calendarIconPosition", publicName: "calendarIconPosition", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, checkboxChecked: { classPropertyName: "checkboxChecked", publicName: "checkboxChecked", isSignal: true, isRequired: false, transformFunction: null }, checkboxPosition: { classPropertyName: "checkboxPosition", publicName: "checkboxPosition", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, singleDatePicker: { classPropertyName: "singleDatePicker", publicName: "singleDatePicker", isSignal: true, isRequired: false, transformFunction: null }, autoApply: { classPropertyName: "autoApply", publicName: "autoApply", isSignal: true, isRequired: false, transformFunction: null }, showDropdowns: { classPropertyName: "showDropdowns", publicName: "showDropdowns", isSignal: true, isRequired: false, transformFunction: null }, timePicker: { classPropertyName: "timePicker", publicName: "timePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker24Hour: { classPropertyName: "timePicker24Hour", publicName: "timePicker24Hour", isSignal: true, isRequired: false, transformFunction: null }, timePickerIncrement: { classPropertyName: "timePickerIncrement", publicName: "timePickerIncrement", isSignal: true, isRequired: false, transformFunction: null }, timePickerSeconds: { classPropertyName: "timePickerSeconds", publicName: "timePickerSeconds", isSignal: true, isRequired: false, transformFunction: null }, linkedCalendars: { classPropertyName: "linkedCalendars", publicName: "linkedCalendars", isSignal: true, isRequired: false, transformFunction: null }, autoUpdateInput: { classPropertyName: "autoUpdateInput", publicName: "autoUpdateInput", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowCalendars: { classPropertyName: "alwaysShowCalendars", publicName: "alwaysShowCalendars", isSignal: true, isRequired: false, transformFunction: null }, showCustomRangeLabel: { classPropertyName: "showCustomRangeLabel", publicName: "showCustomRangeLabel", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, maxSpan: { classPropertyName: "maxSpan", publicName: "maxSpan", isSignal: true, isRequired: false, transformFunction: null }, showWeekNumbers: { classPropertyName: "showWeekNumbers", publicName: "showWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, showISOWeekNumbers: { classPropertyName: "showISOWeekNumbers", publicName: "showISOWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, buttonClasses: { classPropertyName: "buttonClasses", publicName: "buttonClasses", isSignal: true, isRequired: false, transformFunction: null }, applyButtonClasses: { classPropertyName: "applyButtonClasses", publicName: "applyButtonClasses", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonClasses: { classPropertyName: "cancelButtonClasses", publicName: "cancelButtonClasses", isSignal: true, isRequired: false, transformFunction: null }, isInvalidDate: { classPropertyName: "isInvalidDate", publicName: "isInvalidDate", isSignal: true, isRequired: false, transformFunction: null }, isCustomDate: { classPropertyName: "isCustomDate", publicName: "isCustomDate", isSignal: true, isRequired: false, transformFunction: null }, minYear: { classPropertyName: "minYear", publicName: "minYear", isSignal: true, isRequired: false, transformFunction: null }, maxYear: { classPropertyName: "maxYear", publicName: "maxYear", isSignal: true, isRequired: false, transformFunction: null }, ranges: { classPropertyName: "ranges", publicName: "ranges", isSignal: true, isRequired: false, transformFunction: null }, opens: { classPropertyName: "opens", publicName: "opens", isSignal: true, isRequired: false, transformFunction: null }, drops: { classPropertyName: "drops", publicName: "drops", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "headerTemplate", isSignal: true, isRequired: false, transformFunction: null }, footerTemplate: { classPropertyName: "footerTemplate", publicName: "footerTemplate", isSignal: true, isRequired: false, transformFunction: null }, dayTemplate: { classPropertyName: "dayTemplate", publicName: "dayTemplate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", rangeChange: "rangeChange", openEvent: "openEvent", closeEvent: "closeEvent", monthChange: "monthChange", yearChange: "yearChange", dateHover: "dateHover", validationError: "validationError", checkboxChange: "checkboxChange" }, providers: [
|
|
3515
4013
|
{
|
|
3516
4014
|
provide: NG_VALUE_ACCESSOR,
|
|
3517
4015
|
useExisting: forwardRef(() => NgxDatex),
|
|
@@ -3520,7 +4018,7 @@ class NgxDatex {
|
|
|
3520
4018
|
NgxDatexOverlayService,
|
|
3521
4019
|
NgxDatexTimePickerService,
|
|
3522
4020
|
NgxDatexCalendarService,
|
|
3523
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "calendarTemplate", first: true, predicate: ["calendarTemplate"], descendants: true }], ngImport: i0, template: "<div class=\"ngx-datex-container\" [class.ngx-datex-mobile]=\"isMobileDevice()\">\r\n <!-- Input Field -->\r\n <mat-form-field\r\n [appearance]=\"appearance()\"\r\n [floatLabel]=\"floatLabel()\"\r\n class=\"ngx-datex-input-field\"\r\n >\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n\r\n <!-- Checkbox como prefix -->\r\n @if (showCheckbox() && checkboxPosition() === 'prefix') {\r\n <mat-checkbox\r\n matPrefix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-prefix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n <!-- \u00CDcono como prefix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'prefix') {\r\n <mat-icon\r\n matPrefix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <input\r\n matInput\r\n #inputElement\r\n [value]=\"displayValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-describedby]=\"ariaDescribedBy()\"\r\n (click)=\"onInputClick()\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (keyup)=\"onInputKeyup()\"\r\n autocomplete=\"off\"\r\n />\r\n\r\n <!-- \u00CDcono como suffix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'suffix') {\r\n <mat-icon\r\n matSuffix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <!-- Checkbox como suffix -->\r\n @if (showCheckbox() && checkboxPosition() === 'suffix') {\r\n <mat-checkbox\r\n matSuffix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-suffix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n @if (hasError()) {\r\n <mat-error>{{ errorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- Calendar Template for CDK Overlay -->\r\n <ng-template #calendarTemplate>\r\n <div\r\n class=\"ngx-datex-overlay\"\r\n [class.ngx-datex-overlay-mobile]=\"isMobileDevice()\"\r\n [class.ngx-datex-single]=\"singleDatePicker()\"\r\n [class.ngx-datex-arrow-up]=\"arrowDirection() === 'up'\"\r\n [class.ngx-datex-arrow-down]=\"arrowDirection() === 'down'\"\r\n [class.ngx-datex-arrow-left]=\"arrowDirection() === 'left'\"\r\n [class.ngx-datex-arrow-right]=\"arrowDirection() === 'right'\"\r\n [class.ngx-datex-arrow-align-start]=\"arrowAlignment() === 'start'\"\r\n [class.ngx-datex-arrow-align-center]=\"arrowAlignment() === 'center'\"\r\n [class.ngx-datex-arrow-align-end]=\"arrowAlignment() === 'end'\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"headerTitle()\"\r\n tabindex=\"-1\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"onCalendarKeydown($event)\"\r\n >\r\n <!-- Mobile Header (only shown on mobile) -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-mobile-header\">\r\n <div class=\"ngx-datex-mobile-header-content\">\r\n <div class=\"ngx-datex-mobile-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-mobile-range-label\">\r\n @if (currentLabel()) {\r\n {{ currentLabel() }}\r\n }\r\n </div>\r\n </div>\r\n <div class=\"ngx-datex-mobile-header-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"ngx-datex-content\">\r\n <!-- Predefined Ranges - Desktop: Sidebar, Mobile: Horizontal Chips -->\r\n @if (showRanges()) {\r\n <!-- Desktop Ranges Sidebar -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-sidebar\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Rango Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Mobile Ranges Chips -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-chips\">\r\n <div class=\"ngx-datex-ranges-chips-container\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Calendar Section -->\r\n <div class=\"ngx-datex-calendar-section\">\r\n <!-- Calendar Container -->\r\n <div class=\"ngx-datex-calendars\" (mouseleave)=\"onCalendarMouseLeave()\">\r\n <!-- Left Calendar -->\r\n <div\r\n class=\"ngx-datex-calendar ngx-datex-calendar-left\"\r\n [class.ngx-datex-calendar-single]=\"singleDatePicker()\"\r\n >\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('left')\"\r\n [disabled]=\"!canNavigatePrevious('left')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"leftCalendarMonthValue()\"\r\n (change)=\"onMonthChange('left', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"leftCalendarYearValue()\"\r\n (change)=\"onYearChange('left', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[leftCalendarMonthValue()] }} {{ leftCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('left')\"\r\n [disabled]=\"!canNavigateNext('left')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of leftCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"isOtherMonth(date, leftCalendarMonth())\"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Left Calendar -->\r\n @if (timePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedStartHour()\"\r\n (change)=\"onStartHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedStartMinute()\"\r\n (change)=\"onStartMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableStartMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedStartMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedStartAmPm()\"\r\n (change)=\"onStartAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Right Calendar (for range picker) -->\r\n @if (!singleDatePicker()) {\r\n <div class=\"ngx-datex-calendar ngx-datex-calendar-right\">\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('right')\"\r\n [disabled]=\"!canNavigatePrevious('right')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"rightCalendarMonthValue()\"\r\n (change)=\"onMonthChange('right', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"rightCalendarYearValue()\"\r\n (change)=\"onYearChange('right', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[rightCalendarMonthValue()] }} {{ rightCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('right')\"\r\n [disabled]=\"!canNavigateNext('right')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of rightCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"\r\n isOtherMonth(date, rightCalendarMonth())\r\n \"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Right Calendar -->\r\n @if (timePicker() && !singleDatePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedEndHour()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedEndMinute()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableEndMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedEndMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedEndAmPm()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Footer with selected range and buttons (desktop only) -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-footer\">\r\n <div class=\"ngx-datex-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-footer-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".ngx-datex-container{position:relative;display:inline-block;width:100%}.ngx-datex-input-field{width:100%}.ngx-datex-calendar-icon{cursor:pointer;transition:color .2s ease;font-size:20px}.ngx-datex-calendar-icon:hover,.ngx-datex-calendar-icon.ngx-datex-icon-active{color:var(--ngx-datex-primary-color, #1976d2)}.ngx-datex-overlay-panel{z-index:1000}.ngx-datex-mobile-overlay{z-index:1001}.ngx-datex-overlay{background:#fff;border-radius:8px;box-shadow:0 5px 15px #00000026,0 2px 4px #0000001f;border:1px solid #e0e0e0;width:650px;font-family:Roboto,sans-serif;font-size:12px;line-height:1em;position:relative;color:#212121}.ngx-datex-overlay:before,.ngx-datex-overlay:after{position:absolute;content:\"\";display:none;z-index:10}.ngx-datex-overlay.ngx-datex-arrow-down:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #e0e0e0;top:-7px}.ngx-datex-overlay.ngx-datex-arrow-down:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;top:-6px}.ngx-datex-overlay.ngx-datex-arrow-up:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #e0e0e0;bottom:-7px}.ngx-datex-overlay.ngx-datex-arrow-up:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #ffffff;bottom:-6px}.ngx-datex-overlay.ngx-datex-arrow-right:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #e0e0e0;left:-7px}.ngx-datex-overlay.ngx-datex-arrow-right:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #ffffff;left:-6px}.ngx-datex-overlay.ngx-datex-arrow-left:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #e0e0e0;right:-7px}.ngx-datex-overlay.ngx-datex-arrow-left:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #ffffff;right:-6px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:before{left:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:after{left:21px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:before{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:after{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:before{right:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:after{right:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:before{top:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:after{top:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:before{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:after{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:before{bottom:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:after{bottom:21px}.ngx-datex-overlay.ngx-datex-single{width:300px}.ngx-datex-overlay.ngx-datex-single .ngx-datex-ranges-sidebar{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile{width:100vw;max-width:100vw;min-width:100vw;border-radius:16px 16px 0 0;max-height:90vh;overflow-y:auto;box-shadow:0 -8px 32px #0003;border:none;margin:0;padding:0}.ngx-datex-overlay.ngx-datex-overlay-mobile:before,.ngx-datex-overlay.ngx-datex-overlay-mobile:after{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-content{min-height:auto;padding:0;margin:0;width:100%;display:flex;flex-direction:column}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar-section{padding:0;margin:0;width:100%;flex:1}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendars{padding:16px;gap:20px;margin:0;width:100%;box-sizing:border-box}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar{padding:0;margin:0;border-radius:0;background:transparent;border:none;box-shadow:none;width:100%}.ngx-datex-content{display:flex;min-height:350px}.ngx-datex-ranges-sidebar{width:140px;background:#fff;border-right:1px solid #e0e0e0;padding:0;border-radius:8px 0 0 8px;display:flex;flex-direction:column}.ngx-datex-range-item{background:none;border:none;padding:8px 12px;text-align:left;cursor:pointer;font-size:12px;color:#212121;transition:all .2s ease;border-radius:0;margin:2px 0}.ngx-datex-range-item:hover{background:#f5f5f5;color:#1976d2}.ngx-datex-range-item.ngx-datex-range-active{background:#1976d2;color:#fff;font-weight:500}.ngx-datex-ranges-chips{width:100%;background:#fff;border-bottom:1px solid #e0e0e0;padding:16px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-ranges-chips::-webkit-scrollbar{display:none}.ngx-datex-ranges-chips-container{display:flex;gap:12px;padding:0 16px;min-width:max-content}.ngx-datex-range-chip{background:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;padding:10px 16px;font-size:14px;font-weight:500;color:#495057;cursor:pointer;transition:all .3s ease;white-space:nowrap;flex-shrink:0;min-height:40px;display:flex;align-items:center;justify-content:center;min-width:80px;text-align:center}.ngx-datex-range-chip:hover{background:#e3f2fd;border-color:#2196f3;color:#1976d2;transform:translateY(-2px);box-shadow:0 4px 12px #2196f340}.ngx-datex-range-chip.ngx-datex-range-chip-active{background:linear-gradient(135deg,#2196f3,#1976d2);border-color:#1976d2;color:#fff;font-weight:600;box-shadow:0 4px 16px #1976d266;transform:translateY(-1px)}.ngx-datex-range-chip:active{transform:translateY(0)}.ngx-datex-calendar-section{flex:1;display:flex;flex-direction:column}@media(max-width:768px){.ngx-datex-ranges-chips+.ngx-datex-calendar-section{padding-top:0}.ngx-datex-calendar-section{padding:0;background:#fff;width:100%;margin:0}}.ngx-datex-calendars{display:flex;padding:0;gap:0;flex:1}@media(max-width:768px){.ngx-datex-calendars{flex-direction:column;gap:16px;padding:12px;width:100%;margin:0;box-sizing:border-box}}.ngx-datex-calendar{flex:1;padding:8px;min-width:0}.ngx-datex-calendar.ngx-datex-calendar-right{padding:8px}@media(max-width:768px){.ngx-datex-calendar{padding:0;background:transparent;border:none;box-shadow:none;width:100%;flex:none;min-width:unset;box-sizing:border-box;margin:0}.ngx-datex-calendar .ngx-datex-calendar-grid{width:100%;margin:0}.ngx-datex-calendar .ngx-datex-week{width:100%;display:table-row;margin:0}.ngx-datex-calendar .ngx-datex-day{display:table-cell;width:14.28%;margin:0;padding:0}.ngx-datex-calendar .ngx-datex-days-header{width:100%;margin:0 0 8px}.ngx-datex-calendar .ngx-datex-calendar-header{margin:0 0 16px;padding:0}}.ngx-datex-calendar.ngx-datex-calendar-single{padding:8px}.ngx-datex-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:0;height:28px}@media(max-width:768px){.ngx-datex-calendar-header{height:40px;margin-bottom:12px;padding:0 4px}}.ngx-datex-nav-button{background:none;border:none;cursor:pointer;padding:4px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;color:#757575;width:32px;height:28px}@media(max-width:768px){.ngx-datex-nav-button{width:40px;height:40px;border-radius:6px;background:#f5f5f5}.ngx-datex-nav-button mat-icon{font-size:18px}}.ngx-datex-nav-button:hover:not(:disabled){background:#f5f5f5;color:#1976d2}.ngx-datex-nav-button:disabled{opacity:.5;cursor:not-allowed}.ngx-datex-nav-button mat-icon{font-size:18px;width:18px;height:18px;color:inherit}.ngx-datex-month-year{display:flex;align-items:center;gap:4px;font-weight:500;font-size:12px}@media(max-width:768px){.ngx-datex-month-year{font-size:16px;font-weight:600;gap:8px}}.ngx-datex-month-select,.ngx-datex-year-select{border:1px solid #e0e0e0;border-radius:3px;padding:1px 2px;font-size:12px;background:#fff;cursor:pointer;color:#212121;height:auto;margin:0;outline:none;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:20px}@media(max-width:768px){.ngx-datex-month-select,.ngx-datex-year-select{font-size:14px;padding:4px 8px;border-radius:6px;min-height:32px;border:2px solid #e0e0e0}}.ngx-datex-month-select:focus,.ngx-datex-year-select:focus{outline:none;border-color:#1976d2;box-shadow:0 0 0 2px #1976d233}.ngx-datex-month-select option,.ngx-datex-year-select option{background:#fff;color:#212121}.ngx-datex-month-select{margin-right:2%;width:56%;min-width:50px}.ngx-datex-year-select{width:40%;min-width:50px}.ngx-datex-days-header{display:table;width:100%;margin-bottom:0;border-collapse:collapse;border-spacing:0}@media(max-width:768px){.ngx-datex-days-header{width:100%;margin:0 0 8px;padding:0}}.ngx-datex-days-header-row{display:table-row}.ngx-datex-day-header{display:table-cell;text-align:center;font-size:12px;font-weight:500;width:14.28%;height:28px;line-height:28px;background:#fff;color:#212121;box-sizing:border-box;vertical-align:middle;padding:0}@media(max-width:768px){.ngx-datex-day-header{height:36px;line-height:36px;font-size:13px;font-weight:600;background:#f8f9fa;color:#495057;border-bottom:1px solid #e0e0e0}}.ngx-datex-calendar-grid{display:table;width:100%;margin:0;padding:0;border-collapse:collapse;border-spacing:0;table-layout:fixed}@media(max-width:768px){.ngx-datex-calendar-grid{border-radius:0;overflow:visible;width:100%;margin:0;padding:0}}.ngx-datex-week{display:table-row}.ngx-datex-day{display:table-cell;width:14.28%;height:28px;text-align:center;font-size:12px;padding:0;margin:0;box-sizing:border-box;border:1px solid transparent;background:#fff;cursor:pointer}@media(max-width:768px){.ngx-datex-day{height:40px;font-size:15px;font-weight:500;line-height:40px;vertical-align:middle;border:1px solid #f0f0f0}}.ngx-datex-day{transition:all .15s ease;position:relative;border-radius:4px;line-height:28px;white-space:nowrap;color:#212121;vertical-align:middle}.ngx-datex-day:hover:not(:disabled){background:#f5f5f5;color:#212121}.ngx-datex-day.ngx-datex-day-other-month{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:inherit!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-today{font-weight:700;background:#1976d21a;color:#1976d2}.ngx-datex-day.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-active{background-color:#1976d2;border-color:transparent;color:#fff}.ngx-datex-day.ngx-datex-day-selected:hover,.ngx-datex-day.ngx-datex-day-active:hover{background-color:#1976d2;opacity:.9}.ngx-datex-day.ngx-datex-day-in-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-range-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-range-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-range-start.ngx-datex-day-range-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-hover-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-hover-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-hover-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-hover-start.ngx-datex-day-hover-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-disabled{color:#bdbdbd;cursor:not-allowed;text-decoration:line-through}.ngx-datex-day.ngx-datex-day-disabled:hover{background:#fff;color:#bdbdbd}.ngx-datex-footer{padding:8px;border-top:1px solid #e0e0e0;background:#fff;border-radius:0 0 8px 8px;display:flex;justify-content:space-between;align-items:center;line-height:10px;vertical-align:middle;margin:0}.ngx-datex-selected-range{font-size:12px;color:#212121;font-weight:400;display:inline-block;padding-right:8px}.ngx-datex-footer-buttons{display:flex;gap:4px}.ngx-datex-cancel-button,.ngx-datex-apply-button{min-width:70px;font-weight:700;font-size:12px;padding:7px 8px;border-radius:3px;border:1px solid transparent;cursor:pointer;transition:all .15s ease-in-out;margin-left:4px}.ngx-datex-cancel-button{background-color:#dc3545;border-color:#dc3545;color:#fff}.ngx-datex-cancel-button:hover:not(:disabled){background-color:#dc3545;border-color:#dc3545;opacity:.8}.ngx-datex-apply-button{background-color:#22c55e;border-color:#22c55e;color:#fff}.ngx-datex-apply-button:disabled{background:#9ca3af;border-color:#9ca3af;opacity:.6;cursor:not-allowed}.ngx-datex-apply-button:hover:not(:disabled){background-color:#22c55e;border-color:#22c55e;opacity:.8}.ngx-datex-mobile .ngx-datex-overlay{position:fixed;inset:auto 0 0;width:100%;max-width:100vw;min-width:100vw;border-radius:12px 12px 0 0;margin:0;max-height:85vh;overflow-y:auto;z-index:999999;box-shadow:0 -4px 20px #00000026}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:none}.ngx-datex-mobile .ngx-datex-content{flex-direction:column}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:100%;border-right:none;border-bottom:1px solid #e0e0e0;border-radius:12px 12px 0 0;flex-direction:row;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar::-webkit-scrollbar{display:none}.ngx-datex-mobile .ngx-datex-range-item{white-space:nowrap;padding:8px 12px;margin:0 4px;border-radius:20px;background-color:#f5f5f5;border:1px solid #e0e0e0;flex:0 0 auto;min-width:60px;text-align:center;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.ngx-datex-mobile .ngx-datex-range-item:hover{background-color:#1976d21a;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.ngx-datex-mobile .ngx-datex-range-item.ngx-datex-range-active{background-color:#1976d2;color:#fff;border-color:#1976d2;font-weight:600}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:column;padding:6px}.ngx-datex-mobile .ngx-datex-calendar{width:100%;padding:6px}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;height:28px;line-height:28px;font-size:11px;font-weight:600;text-align:center;padding:0;margin:0;box-sizing:border-box;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;height:40px;line-height:40px;font-size:15px;font-weight:500;border-radius:6px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-footer{display:none}.ngx-datex-mobile-header{width:100%;background-color:#fff;color:#333;border-radius:16px 16px 0 0;box-sizing:border-box;position:relative;z-index:3;border-bottom:1px solid #e0e0e0;display:flex;flex-direction:column;gap:0;padding:12px 0 8px}.ngx-datex-mobile-header-content{padding:0 16px 8px;text-align:center;flex:1}.ngx-datex-mobile-header-buttons{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 0;gap:12px;border-top:1px solid #f0f0f0;background-color:#fff}.ngx-datex-mobile-selected-range{display:block;font-size:16px;font-weight:600;line-height:1.3;color:#1a1a1a;margin-bottom:2px}.ngx-datex-mobile-range-label{display:block;font-size:13px;font-weight:500;color:#2196f3;margin-top:2px}.ngx-datex-mobile-cancel-button,.ngx-datex-mobile-apply-button{flex:1;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease;border:2px solid transparent;text-transform:none;letter-spacing:0;min-height:40px;display:flex;align-items:center;justify-content:center}.ngx-datex-mobile-cancel-button{background:#dc3545;border:2px solid #dc3545;color:#fff}.ngx-datex-mobile-cancel-button:hover{background:#c82333;border-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 12px #dc35454d}.ngx-datex-mobile-cancel-button:active{transform:translateY(0);box-shadow:0 2px 4px #dc354533}.ngx-datex-mobile-apply-button{background:#28a745;border:2px solid #28a745;color:#fff}.ngx-datex-mobile-apply-button:hover{background:#218838;border-color:#218838;transform:translateY(-1px);box-shadow:0 4px 16px #28a7454d}.ngx-datex-mobile-apply-button:active{transform:translateY(0);box-shadow:0 2px 8px #28a74533}.ngx-datex-mobile-apply-button:disabled{background:#e0e0e0;border-color:#e0e0e0;color:#9e9e9e;cursor:not-allowed;transform:none;box-shadow:none}.ngx-datex-day:focus{outline:2px solid #1976d2;outline-offset:-2px;z-index:1}.ngx-datex-nav-button:focus{outline:2px solid #1976d2;outline-offset:2px}.ngx-datex-range-item:focus{outline:2px solid #1976d2;outline-offset:-2px}.ngx-datex-overlay{animation:fadeInScale .2s ease-out}.ngx-datex-overlay:before,.ngx-datex-overlay:after{animation:fadeInArrow .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:after{animation:fadeInArrowCenterHorizontal .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:after{animation:fadeInArrowCenterVertical .2s ease-out .1s both}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes fadeInArrow{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes fadeInArrowCenterHorizontal{0%{opacity:0;transform:translate(-50%) scale(.8)}to{opacity:1;transform:translate(-50%) scale(1)}}@keyframes fadeInArrowCenterVertical{0%{opacity:0;transform:translateY(-50%) scale(.8)}to{opacity:1;transform:translateY(-50%) scale(1)}}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-right{display:none}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-left{padding:8px}.ngx-datex-time-picker{border-top:1px solid #e0e0e0;padding:8px;background:#fff;margin-top:8px}.ngx-datex-time-controls{display:flex;justify-content:center;align-items:center;gap:4px;flex-wrap:nowrap}.ngx-datex-time-separator{font-size:14px;font-weight:700;color:#333;margin:0 2px;line-height:1}.ngx-datex-time-select{border:1px solid #ccc;border-radius:3px;padding:2px 4px;font-size:11px;background:#fff;color:#333;outline:none;cursor:pointer;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:22px;line-height:1}.ngx-datex-time-select:focus{border-color:#1976d2;box-shadow:0 0 0 1px #1976d233}.ngx-datex-time-select:disabled{background:#f5f5f5;color:#999;cursor:not-allowed;opacity:.6}.ngx-datex-time-select option{padding:2px 4px;font-size:11px}.ngx-datex-hour-select,.ngx-datex-minute-select{width:50px;text-align:center}.ngx-datex-ampm-select{width:45px;text-align:center}.ngx-datex-mobile .ngx-datex-time-picker{margin-top:12px;padding:12px}.ngx-datex-mobile .ngx-datex-time-controls{gap:6px}.ngx-datex-mobile .ngx-datex-time-separator{font-size:16px;margin:0 4px}.ngx-datex-mobile .ngx-datex-time-select{font-size:14px;padding:4px 6px;min-height:32px;border-radius:4px}.ngx-datex-mobile .ngx-datex-hour-select,.ngx-datex-mobile .ngx-datex-minute-select{width:60px}.ngx-datex-mobile .ngx-datex-ampm-select{width:55px}@media(min-width:564px)and (max-width:768px){.ngx-datex-overlay.ngx-datex-overlay-mobile{position:fixed;width:90%;max-width:500px;inset:auto auto 20px 50%;transform:translate(-50%);border-radius:8px}}@media(min-width:564px){.ngx-datex-mobile .ngx-datex-overlay{position:absolute;inset:100% auto auto 0;width:650px;max-width:90vw;border-radius:8px;margin-top:7px;max-height:none}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:inline-block}.ngx-datex-mobile .ngx-datex-footer{display:flex}.ngx-datex-mobile .ngx-datex-mobile-header{display:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:140px;flex-direction:column;border-right:1px solid #e0e0e0;border-bottom:none;border-radius:8px 0 0 8px;overflow-x:visible;padding:0}.ngx-datex-mobile .ngx-datex-range-item{white-space:normal;padding:8px 12px;margin:2px 0;border-radius:0;background:none;border:none;text-align:left;min-width:auto}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:row;padding:0}.ngx-datex-mobile .ngx-datex-calendar{padding:8px 0 8px 8px}.ngx-datex-mobile .ngx-datex-calendar.ngx-datex-calendar-right{padding:8px 8px 8px 0}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;box-sizing:border-box;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;border-radius:4px;box-sizing:border-box;text-align:center;vertical-align:middle}}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover,.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4021
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "calendarTemplate", first: true, predicate: ["calendarTemplate"], descendants: true }], ngImport: i0, template: "<div class=\"ngx-datex-container\" [class.ngx-datex-mobile]=\"isMobileDevice()\">\r\n <!-- Input Field -->\r\n <mat-form-field\r\n [appearance]=\"appearance()\"\r\n [floatLabel]=\"floatLabel()\"\r\n class=\"ngx-datex-input-field\"\r\n >\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n\r\n <!-- Checkbox como prefix -->\r\n @if (showCheckbox() && checkboxPosition() === 'prefix') {\r\n <mat-checkbox\r\n matPrefix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-prefix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n <!-- \u00CDcono como prefix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'prefix') {\r\n <mat-icon\r\n matPrefix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <input\r\n matInput\r\n #inputElement\r\n [value]=\"displayValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-describedby]=\"ariaDescribedBy()\"\r\n (click)=\"onInputClick()\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (keyup)=\"onInputKeyup()\"\r\n autocomplete=\"off\"\r\n />\r\n\r\n <!-- \u00CDcono como suffix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'suffix') {\r\n <mat-icon\r\n matSuffix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <!-- Checkbox como suffix -->\r\n @if (showCheckbox() && checkboxPosition() === 'suffix') {\r\n <mat-checkbox\r\n matSuffix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-suffix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n @if (hasError()) {\r\n <mat-error>{{ errorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- Calendar Template for CDK Overlay -->\r\n <ng-template #calendarTemplate>\r\n <div\r\n class=\"ngx-datex-overlay\"\r\n [class.ngx-datex-overlay-mobile]=\"isMobileDevice()\"\r\n [class.ngx-datex-single]=\"singleDatePicker()\"\r\n [class.ngx-datex-arrow-up]=\"arrowDirection() === 'up'\"\r\n [class.ngx-datex-arrow-down]=\"arrowDirection() === 'down'\"\r\n [class.ngx-datex-arrow-left]=\"arrowDirection() === 'left'\"\r\n [class.ngx-datex-arrow-right]=\"arrowDirection() === 'right'\"\r\n [class.ngx-datex-arrow-align-start]=\"arrowAlignment() === 'start'\"\r\n [class.ngx-datex-arrow-align-center]=\"arrowAlignment() === 'center'\"\r\n [class.ngx-datex-arrow-align-end]=\"arrowAlignment() === 'end'\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"headerTitle()\"\r\n tabindex=\"-1\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"onCalendarKeydown($event)\"\r\n >\r\n <!-- Mobile Header (only shown on mobile) -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-mobile-header\">\r\n <div class=\"ngx-datex-mobile-header-content\">\r\n <div class=\"ngx-datex-mobile-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-mobile-range-label\">\r\n @if (currentLabel()) {\r\n {{ currentLabel() }}\r\n }\r\n </div>\r\n </div>\r\n <div class=\"ngx-datex-mobile-header-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"ngx-datex-content\">\r\n <!-- Predefined Ranges - Desktop: Sidebar, Mobile: Horizontal Chips -->\r\n @if (showRanges()) {\r\n <!-- Desktop Ranges Sidebar -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-sidebar\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Rango Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Mobile Ranges Chips -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-chips\">\r\n <div class=\"ngx-datex-ranges-chips-container\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Calendar Section -->\r\n <div class=\"ngx-datex-calendar-section\">\r\n <!-- Calendar Container -->\r\n <div class=\"ngx-datex-calendars\" (mouseleave)=\"onCalendarMouseLeave()\">\r\n <!-- Left Calendar -->\r\n <div\r\n class=\"ngx-datex-calendar ngx-datex-calendar-left\"\r\n [class.ngx-datex-calendar-single]=\"singleDatePicker()\"\r\n >\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('left')\"\r\n [disabled]=\"!canNavigatePrevious('left')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"leftCalendarMonthValue()\"\r\n (change)=\"onMonthChange('left', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"leftCalendarYearValue()\"\r\n (change)=\"onYearChange('left', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[leftCalendarMonthValue()] }} {{ leftCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('left')\"\r\n [disabled]=\"!canNavigateNext('left')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of leftCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"isOtherMonth(date, leftCalendarMonth())\"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Left Calendar -->\r\n @if (timePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedStartHour()\"\r\n (change)=\"onStartHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedStartMinute()\"\r\n (change)=\"onStartMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableStartMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedStartMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedStartAmPm()\"\r\n (change)=\"onStartAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Right Calendar (for range picker) -->\r\n @if (!singleDatePicker()) {\r\n <div class=\"ngx-datex-calendar ngx-datex-calendar-right\">\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('right')\"\r\n [disabled]=\"!canNavigatePrevious('right')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"rightCalendarMonthValue()\"\r\n (change)=\"onMonthChange('right', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"rightCalendarYearValue()\"\r\n (change)=\"onYearChange('right', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[rightCalendarMonthValue()] }} {{ rightCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('right')\"\r\n [disabled]=\"!canNavigateNext('right')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of rightCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"\r\n isOtherMonth(date, rightCalendarMonth())\r\n \"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Right Calendar -->\r\n @if (timePicker() && !singleDatePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedEndHour()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedEndMinute()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableEndMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedEndMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedEndAmPm()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Footer with selected range and buttons (desktop only) -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-footer\">\r\n <div class=\"ngx-datex-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-footer-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".ngx-datex-container{position:relative;display:inline-block;width:100%}.ngx-datex-input-field{width:100%}.ngx-datex-calendar-icon{cursor:pointer;transition:color .2s ease;font-size:20px}.ngx-datex-calendar-icon:hover,.ngx-datex-calendar-icon.ngx-datex-icon-active{color:var(--ngx-datex-primary-color, #1976d2)}.ngx-datex-overlay-panel{z-index:1000}.ngx-datex-mobile-overlay{z-index:1001}.ngx-datex-overlay{background:#fff;border-radius:8px;box-shadow:0 5px 15px #00000026,0 2px 4px #0000001f;border:1px solid #e0e0e0;width:650px;font-family:Roboto,sans-serif;font-size:12px;line-height:1em;position:relative;color:#212121}.ngx-datex-overlay:before,.ngx-datex-overlay:after{position:absolute;content:\"\";display:none;z-index:10}.ngx-datex-overlay.ngx-datex-arrow-down:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #e0e0e0;top:-7px}.ngx-datex-overlay.ngx-datex-arrow-down:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;top:-6px}.ngx-datex-overlay.ngx-datex-arrow-up:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #e0e0e0;bottom:-7px}.ngx-datex-overlay.ngx-datex-arrow-up:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #ffffff;bottom:-6px}.ngx-datex-overlay.ngx-datex-arrow-right:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #e0e0e0;left:-7px}.ngx-datex-overlay.ngx-datex-arrow-right:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #ffffff;left:-6px}.ngx-datex-overlay.ngx-datex-arrow-left:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #e0e0e0;right:-7px}.ngx-datex-overlay.ngx-datex-arrow-left:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #ffffff;right:-6px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:before{left:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:after{left:21px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:before{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:after{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:before{right:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:after{right:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:before{top:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:after{top:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:before{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:after{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:before{bottom:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:after{bottom:21px}.ngx-datex-overlay.ngx-datex-single{width:300px}.ngx-datex-overlay.ngx-datex-single .ngx-datex-ranges-sidebar{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile{width:100vw;max-width:100vw;min-width:100vw;border-radius:16px 16px 0 0;max-height:90vh;overflow-y:auto;box-shadow:0 -8px 32px #0003;border:none;margin:0;padding:0}.ngx-datex-overlay.ngx-datex-overlay-mobile:before,.ngx-datex-overlay.ngx-datex-overlay-mobile:after{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-content{min-height:auto;padding:0;margin:0;width:100%;display:flex;flex-direction:column}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar-section{padding:0;margin:0;width:100%;flex:1}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendars{padding:16px;gap:20px;margin:0;width:100%;box-sizing:border-box}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar{padding:0;margin:0;border-radius:0;background:transparent;border:none;box-shadow:none;width:100%}.ngx-datex-content{display:flex;min-height:350px}.ngx-datex-ranges-sidebar{width:140px;background:#fff;border-right:1px solid #e0e0e0;padding:0;border-radius:8px 0 0 8px;display:flex;flex-direction:column}.ngx-datex-range-item{background:none;border:none;padding:8px 12px;text-align:left;cursor:pointer;font-size:12px;color:#212121;transition:all .2s ease;border-radius:0;margin:2px 0}.ngx-datex-range-item:hover{background:#f5f5f5;color:#1976d2}.ngx-datex-range-item.ngx-datex-range-active{background:#1976d2;color:#fff;font-weight:500}.ngx-datex-ranges-chips{width:100%;background:#fff;border-bottom:1px solid #e0e0e0;padding:16px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-ranges-chips::-webkit-scrollbar{display:none}.ngx-datex-ranges-chips-container{display:flex;gap:12px;padding:0 16px;min-width:max-content}.ngx-datex-range-chip{background:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;padding:10px 16px;font-size:14px;font-weight:500;color:#495057;cursor:pointer;transition:all .3s ease;white-space:nowrap;flex-shrink:0;min-height:40px;display:flex;align-items:center;justify-content:center;min-width:80px;text-align:center}.ngx-datex-range-chip:hover{background:#e3f2fd;border-color:#2196f3;color:#1976d2;transform:translateY(-2px);box-shadow:0 4px 12px #2196f340}.ngx-datex-range-chip.ngx-datex-range-chip-active{background:linear-gradient(135deg,#2196f3,#1976d2);border-color:#1976d2;color:#fff;font-weight:600;box-shadow:0 4px 16px #1976d266;transform:translateY(-1px)}.ngx-datex-range-chip:active{transform:translateY(0)}.ngx-datex-calendar-section{flex:1;display:flex;flex-direction:column}@media(max-width:768px){.ngx-datex-ranges-chips+.ngx-datex-calendar-section{padding-top:0}.ngx-datex-calendar-section{padding:0;background:#fff;width:100%;margin:0}}.ngx-datex-calendars{display:flex;padding:0;gap:0;flex:1}@media(max-width:768px){.ngx-datex-calendars{flex-direction:column;gap:16px;padding:12px;width:100%;margin:0;box-sizing:border-box}}.ngx-datex-calendar{flex:1;padding:8px;min-width:0}.ngx-datex-calendar.ngx-datex-calendar-right{padding:8px}@media(max-width:768px){.ngx-datex-calendar{padding:0;background:transparent;border:none;box-shadow:none;width:100%;flex:none;min-width:unset;box-sizing:border-box;margin:0}.ngx-datex-calendar .ngx-datex-calendar-grid{width:100%;margin:0}.ngx-datex-calendar .ngx-datex-week{width:100%;display:table-row;margin:0}.ngx-datex-calendar .ngx-datex-day{display:table-cell;width:14.28%;margin:0;padding:0}.ngx-datex-calendar .ngx-datex-days-header{width:100%;margin:0 0 8px}.ngx-datex-calendar .ngx-datex-calendar-header{margin:0 0 16px;padding:0}}.ngx-datex-calendar.ngx-datex-calendar-single{padding:8px}.ngx-datex-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:0;height:28px}@media(max-width:768px){.ngx-datex-calendar-header{height:40px;margin-bottom:12px;padding:0 4px}}.ngx-datex-nav-button{background:none;border:none;cursor:pointer;padding:4px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;color:#757575;width:32px;height:28px}@media(max-width:768px){.ngx-datex-nav-button{width:40px;height:40px;border-radius:6px;background:#f5f5f5}.ngx-datex-nav-button mat-icon{font-size:18px}}.ngx-datex-nav-button:hover:not(:disabled){background:#f5f5f5;color:#1976d2}.ngx-datex-nav-button:disabled{opacity:.5;cursor:not-allowed}.ngx-datex-nav-button mat-icon{font-size:18px;width:18px;height:18px;color:inherit}.ngx-datex-month-year{display:flex;align-items:center;gap:4px;font-weight:500;font-size:12px}@media(max-width:768px){.ngx-datex-month-year{font-size:16px;font-weight:600;gap:8px}}.ngx-datex-month-select,.ngx-datex-year-select{border:1px solid #e0e0e0;border-radius:3px;padding:1px 2px;font-size:12px;background:#fff;cursor:pointer;color:#212121;height:auto;margin:0;outline:none;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:20px}@media(max-width:768px){.ngx-datex-month-select,.ngx-datex-year-select{font-size:14px;padding:4px 8px;border-radius:6px;min-height:32px;border:2px solid #e0e0e0}}.ngx-datex-month-select:focus,.ngx-datex-year-select:focus{outline:none;border-color:#1976d2;box-shadow:0 0 0 2px #1976d233}.ngx-datex-month-select option,.ngx-datex-year-select option{background:#fff;color:#212121}.ngx-datex-month-select{margin-right:2%;width:56%;min-width:50px}.ngx-datex-year-select{width:40%;min-width:50px}.ngx-datex-days-header{display:table;width:100%;margin-bottom:0;border-collapse:collapse;border-spacing:0}@media(max-width:768px){.ngx-datex-days-header{width:100%;margin:0 0 8px;padding:0}}.ngx-datex-days-header-row{display:table-row}.ngx-datex-day-header{display:table-cell;text-align:center;font-size:12px;font-weight:500;width:14.28%;height:28px;line-height:28px;background:#fff;color:#212121;box-sizing:border-box;vertical-align:middle;padding:0}@media(max-width:768px){.ngx-datex-day-header{height:36px;line-height:36px;font-size:13px;font-weight:600;background:#f8f9fa;color:#495057;border-bottom:1px solid #e0e0e0}}.ngx-datex-calendar-grid{display:table;width:100%;margin:0;padding:0;border-collapse:collapse;border-spacing:0;table-layout:fixed}@media(max-width:768px){.ngx-datex-calendar-grid{border-radius:0;overflow:visible;width:100%;margin:0;padding:0}}.ngx-datex-week{display:table-row}.ngx-datex-day{display:table-cell;width:14.28%;height:28px;text-align:center;font-size:12px;padding:0;margin:0;box-sizing:border-box;border:1px solid transparent;background:#fff;cursor:pointer}@media(max-width:768px){.ngx-datex-day{height:40px;font-size:15px;font-weight:500;line-height:40px;vertical-align:middle;border:1px solid #f0f0f0}}.ngx-datex-day{transition:all .15s ease;position:relative;border-radius:4px;line-height:28px;white-space:nowrap;color:#212121;vertical-align:middle}.ngx-datex-day:hover:not(:disabled){background:#f5f5f5;color:#212121}.ngx-datex-day.ngx-datex-day-other-month{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:inherit!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-today{font-weight:700;background:#1976d21a;color:#1976d2}.ngx-datex-day.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-active{background-color:#1976d2;border-color:transparent;color:#fff}.ngx-datex-day.ngx-datex-day-selected:hover,.ngx-datex-day.ngx-datex-day-active:hover{background-color:#1976d2;opacity:.9}.ngx-datex-day.ngx-datex-day-in-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-range-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-range-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-range-start.ngx-datex-day-range-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-hover-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-hover-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-hover-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-hover-start.ngx-datex-day-hover-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-disabled{color:#bdbdbd;cursor:not-allowed;text-decoration:line-through}.ngx-datex-day.ngx-datex-day-disabled:hover{background:#fff;color:#bdbdbd}.ngx-datex-footer{padding:8px;border-top:1px solid #e0e0e0;background:#fff;border-radius:0 0 8px 8px;display:flex;justify-content:space-between;align-items:center;line-height:10px;vertical-align:middle;margin:0}.ngx-datex-selected-range{font-size:12px;color:#212121;font-weight:400;display:inline-block;padding-right:8px}.ngx-datex-footer-buttons{display:flex;gap:4px}.ngx-datex-cancel-button,.ngx-datex-apply-button{min-width:70px;font-weight:700;font-size:12px;padding:7px 8px;border-radius:3px;border:1px solid transparent;cursor:pointer;transition:all .15s ease-in-out;margin-left:4px}.ngx-datex-cancel-button{background-color:#dc3545;border-color:#dc3545;color:#fff}.ngx-datex-cancel-button:hover:not(:disabled){background-color:#dc3545;border-color:#dc3545;opacity:.8}.ngx-datex-apply-button{background-color:#22c55e;border-color:#22c55e;color:#fff}.ngx-datex-apply-button:disabled{background:#9ca3af;border-color:#9ca3af;opacity:.6;cursor:not-allowed}.ngx-datex-apply-button:hover:not(:disabled){background-color:#22c55e;border-color:#22c55e;opacity:.8}.ngx-datex-mobile .ngx-datex-overlay{position:fixed;inset:auto 0 0;width:100%;max-width:100vw;min-width:100vw;border-radius:12px 12px 0 0;margin:0;max-height:85vh;overflow-y:auto;z-index:999999;box-shadow:0 -4px 20px #00000026}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:none}.ngx-datex-mobile .ngx-datex-content{flex-direction:column}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:100%;border-right:none;border-bottom:1px solid #e0e0e0;border-radius:12px 12px 0 0;flex-direction:row;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar::-webkit-scrollbar{display:none}.ngx-datex-mobile .ngx-datex-range-item{white-space:nowrap;padding:8px 12px;margin:0 4px;border-radius:20px;background-color:#f5f5f5;border:1px solid #e0e0e0;flex:0 0 auto;min-width:60px;text-align:center;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.ngx-datex-mobile .ngx-datex-range-item:hover{background-color:#1976d21a;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.ngx-datex-mobile .ngx-datex-range-item.ngx-datex-range-active{background-color:#1976d2;color:#fff;border-color:#1976d2;font-weight:600}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:column;padding:6px}.ngx-datex-mobile .ngx-datex-calendar{width:100%;padding:6px}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;height:28px;line-height:28px;font-size:11px;font-weight:600;text-align:center;padding:0;margin:0;box-sizing:border-box;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;height:40px;line-height:40px;font-size:15px;font-weight:500;border-radius:6px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-footer{display:none}.ngx-datex-mobile-header{width:100%;background-color:#fff;color:#333;border-radius:16px 16px 0 0;box-sizing:border-box;position:relative;z-index:3;border-bottom:1px solid #e0e0e0;display:flex;flex-direction:column;gap:0;padding:12px 0 8px}.ngx-datex-mobile-header-content{padding:0 16px 8px;text-align:center;flex:1}.ngx-datex-mobile-header-buttons{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 0;gap:12px;border-top:1px solid #f0f0f0;background-color:#fff}.ngx-datex-mobile-selected-range{display:block;font-size:16px;font-weight:600;line-height:1.3;color:#1a1a1a;margin-bottom:2px}.ngx-datex-mobile-range-label{display:block;font-size:13px;font-weight:500;color:#2196f3;margin-top:2px}.ngx-datex-mobile-cancel-button,.ngx-datex-mobile-apply-button{flex:1;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease;border:2px solid transparent;text-transform:none;letter-spacing:0;min-height:40px;display:flex;align-items:center;justify-content:center}.ngx-datex-mobile-cancel-button{background:#dc3545;border:2px solid #dc3545;color:#fff}.ngx-datex-mobile-cancel-button:hover{background:#c82333;border-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 12px #dc35454d}.ngx-datex-mobile-cancel-button:active{transform:translateY(0);box-shadow:0 2px 4px #dc354533}.ngx-datex-mobile-apply-button{background:#28a745;border:2px solid #28a745;color:#fff}.ngx-datex-mobile-apply-button:hover{background:#218838;border-color:#218838;transform:translateY(-1px);box-shadow:0 4px 16px #28a7454d}.ngx-datex-mobile-apply-button:active{transform:translateY(0);box-shadow:0 2px 8px #28a74533}.ngx-datex-mobile-apply-button:disabled{background:#e0e0e0;border-color:#e0e0e0;color:#9e9e9e;cursor:not-allowed;transform:none;box-shadow:none}.ngx-datex-day:focus{outline:2px solid #1976d2;outline-offset:-2px;z-index:1}.ngx-datex-nav-button:focus{outline:2px solid #1976d2;outline-offset:2px}.ngx-datex-range-item:focus{outline:2px solid #1976d2;outline-offset:-2px}.ngx-datex-overlay{animation:fadeInScale .2s ease-out}.ngx-datex-overlay:before,.ngx-datex-overlay:after{animation:fadeInArrow .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:after{animation:fadeInArrowCenterHorizontal .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:after{animation:fadeInArrowCenterVertical .2s ease-out .1s both}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes fadeInArrow{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes fadeInArrowCenterHorizontal{0%{opacity:0;transform:translate(-50%) scale(.8)}to{opacity:1;transform:translate(-50%) scale(1)}}@keyframes fadeInArrowCenterVertical{0%{opacity:0;transform:translateY(-50%) scale(.8)}to{opacity:1;transform:translateY(-50%) scale(1)}}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-right{display:none}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-left{padding:8px}.ngx-datex-time-picker{border-top:1px solid #e0e0e0;padding:8px;background:#fff;margin-top:8px}.ngx-datex-time-controls{display:flex;justify-content:center;align-items:center;gap:4px;flex-wrap:nowrap}.ngx-datex-time-separator{font-size:14px;font-weight:700;color:#333;margin:0 2px;line-height:1}.ngx-datex-time-select{border:1px solid #ccc;border-radius:3px;padding:2px 4px;font-size:11px;background:#fff;color:#333;outline:none;cursor:pointer;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:22px;line-height:1}.ngx-datex-time-select:focus{border-color:#1976d2;box-shadow:0 0 0 1px #1976d233}.ngx-datex-time-select:disabled{background:#f5f5f5;color:#999;cursor:not-allowed;opacity:.6}.ngx-datex-time-select option{padding:2px 4px;font-size:11px}.ngx-datex-hour-select,.ngx-datex-minute-select{width:50px;text-align:center}.ngx-datex-ampm-select{width:45px;text-align:center}.ngx-datex-mobile .ngx-datex-time-picker{margin-top:12px;padding:12px}.ngx-datex-mobile .ngx-datex-time-controls{gap:6px}.ngx-datex-mobile .ngx-datex-time-separator{font-size:16px;margin:0 4px}.ngx-datex-mobile .ngx-datex-time-select{font-size:14px;padding:4px 6px;min-height:32px;border-radius:4px}.ngx-datex-mobile .ngx-datex-hour-select,.ngx-datex-mobile .ngx-datex-minute-select{width:60px}.ngx-datex-mobile .ngx-datex-ampm-select{width:55px}@media(min-width:564px)and (max-width:768px){.ngx-datex-overlay.ngx-datex-overlay-mobile{position:fixed;width:90%;max-width:500px;inset:auto auto 20px 50%;transform:translate(-50%);border-radius:8px}}@media(min-width:564px){.ngx-datex-mobile .ngx-datex-overlay{position:absolute;inset:100% auto auto 0;width:650px;max-width:90vw;border-radius:8px;margin-top:7px;max-height:none}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:inline-block}.ngx-datex-mobile .ngx-datex-footer{display:flex}.ngx-datex-mobile .ngx-datex-mobile-header{display:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:140px;flex-direction:column;border-right:1px solid #e0e0e0;border-bottom:none;border-radius:8px 0 0 8px;overflow-x:visible;padding:0}.ngx-datex-mobile .ngx-datex-range-item{white-space:normal;padding:8px 12px;margin:2px 0;border-radius:0;background:none;border:none;text-align:left;min-width:auto}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:row;padding:0}.ngx-datex-mobile .ngx-datex-calendar{padding:8px 0 8px 8px}.ngx-datex-mobile .ngx-datex-calendar.ngx-datex-calendar-right{padding:8px 8px 8px 0}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;box-sizing:border-box;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;border-radius:4px;box-sizing:border-box;text-align:center;vertical-align:middle}}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover,.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3524
4022
|
}
|
|
3525
4023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: NgxDatex, decorators: [{
|
|
3526
4024
|
type: Component,
|
|
@@ -3540,14 +4038,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3540
4038
|
NgxDatexOverlayService,
|
|
3541
4039
|
NgxDatexTimePickerService,
|
|
3542
4040
|
NgxDatexCalendarService,
|
|
3543
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ngx-datex-container\" [class.ngx-datex-mobile]=\"isMobileDevice()\">\r\n <!-- Input Field -->\r\n <mat-form-field\r\n [appearance]=\"appearance()\"\r\n [floatLabel]=\"floatLabel()\"\r\n class=\"ngx-datex-input-field\"\r\n >\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n\r\n <!-- Checkbox como prefix -->\r\n @if (showCheckbox() && checkboxPosition() === 'prefix') {\r\n <mat-checkbox\r\n matPrefix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-prefix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n <!-- \u00CDcono como prefix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'prefix') {\r\n <mat-icon\r\n matPrefix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <input\r\n matInput\r\n #inputElement\r\n [value]=\"displayValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-describedby]=\"ariaDescribedBy()\"\r\n (click)=\"onInputClick()\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (keyup)=\"onInputKeyup()\"\r\n autocomplete=\"off\"\r\n />\r\n\r\n <!-- \u00CDcono como suffix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'suffix') {\r\n <mat-icon\r\n matSuffix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <!-- Checkbox como suffix -->\r\n @if (showCheckbox() && checkboxPosition() === 'suffix') {\r\n <mat-checkbox\r\n matSuffix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-suffix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n @if (hasError()) {\r\n <mat-error>{{ errorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- Calendar Template for CDK Overlay -->\r\n <ng-template #calendarTemplate>\r\n <div\r\n class=\"ngx-datex-overlay\"\r\n [class.ngx-datex-overlay-mobile]=\"isMobileDevice()\"\r\n [class.ngx-datex-single]=\"singleDatePicker()\"\r\n [class.ngx-datex-arrow-up]=\"arrowDirection() === 'up'\"\r\n [class.ngx-datex-arrow-down]=\"arrowDirection() === 'down'\"\r\n [class.ngx-datex-arrow-left]=\"arrowDirection() === 'left'\"\r\n [class.ngx-datex-arrow-right]=\"arrowDirection() === 'right'\"\r\n [class.ngx-datex-arrow-align-start]=\"arrowAlignment() === 'start'\"\r\n [class.ngx-datex-arrow-align-center]=\"arrowAlignment() === 'center'\"\r\n [class.ngx-datex-arrow-align-end]=\"arrowAlignment() === 'end'\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"headerTitle()\"\r\n tabindex=\"-1\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"onCalendarKeydown($event)\"\r\n >\r\n <!-- Mobile Header (only shown on mobile) -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-mobile-header\">\r\n <div class=\"ngx-datex-mobile-header-content\">\r\n <div class=\"ngx-datex-mobile-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-mobile-range-label\">\r\n @if (currentLabel()) {\r\n {{ currentLabel() }}\r\n }\r\n </div>\r\n </div>\r\n <div class=\"ngx-datex-mobile-header-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"ngx-datex-content\">\r\n <!-- Predefined Ranges - Desktop: Sidebar, Mobile: Horizontal Chips -->\r\n @if (showRanges()) {\r\n <!-- Desktop Ranges Sidebar -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-sidebar\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Rango Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Mobile Ranges Chips -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-chips\">\r\n <div class=\"ngx-datex-ranges-chips-container\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Calendar Section -->\r\n <div class=\"ngx-datex-calendar-section\">\r\n <!-- Calendar Container -->\r\n <div class=\"ngx-datex-calendars\" (mouseleave)=\"onCalendarMouseLeave()\">\r\n <!-- Left Calendar -->\r\n <div\r\n class=\"ngx-datex-calendar ngx-datex-calendar-left\"\r\n [class.ngx-datex-calendar-single]=\"singleDatePicker()\"\r\n >\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('left')\"\r\n [disabled]=\"!canNavigatePrevious('left')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"leftCalendarMonthValue()\"\r\n (change)=\"onMonthChange('left', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"leftCalendarYearValue()\"\r\n (change)=\"onYearChange('left', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[leftCalendarMonthValue()] }} {{ leftCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('left')\"\r\n [disabled]=\"!canNavigateNext('left')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of leftCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"isOtherMonth(date, leftCalendarMonth())\"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Left Calendar -->\r\n @if (timePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedStartHour()\"\r\n (change)=\"onStartHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedStartMinute()\"\r\n (change)=\"onStartMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableStartMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedStartMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedStartAmPm()\"\r\n (change)=\"onStartAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Right Calendar (for range picker) -->\r\n @if (!singleDatePicker()) {\r\n <div class=\"ngx-datex-calendar ngx-datex-calendar-right\">\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('right')\"\r\n [disabled]=\"!canNavigatePrevious('right')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"rightCalendarMonthValue()\"\r\n (change)=\"onMonthChange('right', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"rightCalendarYearValue()\"\r\n (change)=\"onYearChange('right', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[rightCalendarMonthValue()] }} {{ rightCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('right')\"\r\n [disabled]=\"!canNavigateNext('right')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of rightCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"\r\n isOtherMonth(date, rightCalendarMonth())\r\n \"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Right Calendar -->\r\n @if (timePicker() && !singleDatePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedEndHour()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedEndMinute()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableEndMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedEndMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedEndAmPm()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Footer with selected range and buttons (desktop only) -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-footer\">\r\n <div class=\"ngx-datex-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-footer-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".ngx-datex-container{position:relative;display:inline-block;width:100%}.ngx-datex-input-field{width:100%}.ngx-datex-calendar-icon{cursor:pointer;transition:color .2s ease;font-size:20px}.ngx-datex-calendar-icon:hover,.ngx-datex-calendar-icon.ngx-datex-icon-active{color:var(--ngx-datex-primary-color, #1976d2)}.ngx-datex-overlay-panel{z-index:1000}.ngx-datex-mobile-overlay{z-index:1001}.ngx-datex-overlay{background:#fff;border-radius:8px;box-shadow:0 5px 15px #00000026,0 2px 4px #0000001f;border:1px solid #e0e0e0;width:650px;font-family:Roboto,sans-serif;font-size:12px;line-height:1em;position:relative;color:#212121}.ngx-datex-overlay:before,.ngx-datex-overlay:after{position:absolute;content:\"\";display:none;z-index:10}.ngx-datex-overlay.ngx-datex-arrow-down:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #e0e0e0;top:-7px}.ngx-datex-overlay.ngx-datex-arrow-down:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;top:-6px}.ngx-datex-overlay.ngx-datex-arrow-up:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #e0e0e0;bottom:-7px}.ngx-datex-overlay.ngx-datex-arrow-up:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #ffffff;bottom:-6px}.ngx-datex-overlay.ngx-datex-arrow-right:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #e0e0e0;left:-7px}.ngx-datex-overlay.ngx-datex-arrow-right:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #ffffff;left:-6px}.ngx-datex-overlay.ngx-datex-arrow-left:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #e0e0e0;right:-7px}.ngx-datex-overlay.ngx-datex-arrow-left:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #ffffff;right:-6px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:before{left:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:after{left:21px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:before{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:after{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:before{right:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:after{right:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:before{top:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:after{top:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:before{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:after{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:before{bottom:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:after{bottom:21px}.ngx-datex-overlay.ngx-datex-single{width:300px}.ngx-datex-overlay.ngx-datex-single .ngx-datex-ranges-sidebar{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile{width:100vw;max-width:100vw;min-width:100vw;border-radius:16px 16px 0 0;max-height:90vh;overflow-y:auto;box-shadow:0 -8px 32px #0003;border:none;margin:0;padding:0}.ngx-datex-overlay.ngx-datex-overlay-mobile:before,.ngx-datex-overlay.ngx-datex-overlay-mobile:after{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-content{min-height:auto;padding:0;margin:0;width:100%;display:flex;flex-direction:column}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar-section{padding:0;margin:0;width:100%;flex:1}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendars{padding:16px;gap:20px;margin:0;width:100%;box-sizing:border-box}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar{padding:0;margin:0;border-radius:0;background:transparent;border:none;box-shadow:none;width:100%}.ngx-datex-content{display:flex;min-height:350px}.ngx-datex-ranges-sidebar{width:140px;background:#fff;border-right:1px solid #e0e0e0;padding:0;border-radius:8px 0 0 8px;display:flex;flex-direction:column}.ngx-datex-range-item{background:none;border:none;padding:8px 12px;text-align:left;cursor:pointer;font-size:12px;color:#212121;transition:all .2s ease;border-radius:0;margin:2px 0}.ngx-datex-range-item:hover{background:#f5f5f5;color:#1976d2}.ngx-datex-range-item.ngx-datex-range-active{background:#1976d2;color:#fff;font-weight:500}.ngx-datex-ranges-chips{width:100%;background:#fff;border-bottom:1px solid #e0e0e0;padding:16px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-ranges-chips::-webkit-scrollbar{display:none}.ngx-datex-ranges-chips-container{display:flex;gap:12px;padding:0 16px;min-width:max-content}.ngx-datex-range-chip{background:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;padding:10px 16px;font-size:14px;font-weight:500;color:#495057;cursor:pointer;transition:all .3s ease;white-space:nowrap;flex-shrink:0;min-height:40px;display:flex;align-items:center;justify-content:center;min-width:80px;text-align:center}.ngx-datex-range-chip:hover{background:#e3f2fd;border-color:#2196f3;color:#1976d2;transform:translateY(-2px);box-shadow:0 4px 12px #2196f340}.ngx-datex-range-chip.ngx-datex-range-chip-active{background:linear-gradient(135deg,#2196f3,#1976d2);border-color:#1976d2;color:#fff;font-weight:600;box-shadow:0 4px 16px #1976d266;transform:translateY(-1px)}.ngx-datex-range-chip:active{transform:translateY(0)}.ngx-datex-calendar-section{flex:1;display:flex;flex-direction:column}@media(max-width:768px){.ngx-datex-ranges-chips+.ngx-datex-calendar-section{padding-top:0}.ngx-datex-calendar-section{padding:0;background:#fff;width:100%;margin:0}}.ngx-datex-calendars{display:flex;padding:0;gap:0;flex:1}@media(max-width:768px){.ngx-datex-calendars{flex-direction:column;gap:16px;padding:12px;width:100%;margin:0;box-sizing:border-box}}.ngx-datex-calendar{flex:1;padding:8px;min-width:0}.ngx-datex-calendar.ngx-datex-calendar-right{padding:8px}@media(max-width:768px){.ngx-datex-calendar{padding:0;background:transparent;border:none;box-shadow:none;width:100%;flex:none;min-width:unset;box-sizing:border-box;margin:0}.ngx-datex-calendar .ngx-datex-calendar-grid{width:100%;margin:0}.ngx-datex-calendar .ngx-datex-week{width:100%;display:table-row;margin:0}.ngx-datex-calendar .ngx-datex-day{display:table-cell;width:14.28%;margin:0;padding:0}.ngx-datex-calendar .ngx-datex-days-header{width:100%;margin:0 0 8px}.ngx-datex-calendar .ngx-datex-calendar-header{margin:0 0 16px;padding:0}}.ngx-datex-calendar.ngx-datex-calendar-single{padding:8px}.ngx-datex-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:0;height:28px}@media(max-width:768px){.ngx-datex-calendar-header{height:40px;margin-bottom:12px;padding:0 4px}}.ngx-datex-nav-button{background:none;border:none;cursor:pointer;padding:4px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;color:#757575;width:32px;height:28px}@media(max-width:768px){.ngx-datex-nav-button{width:40px;height:40px;border-radius:6px;background:#f5f5f5}.ngx-datex-nav-button mat-icon{font-size:18px}}.ngx-datex-nav-button:hover:not(:disabled){background:#f5f5f5;color:#1976d2}.ngx-datex-nav-button:disabled{opacity:.5;cursor:not-allowed}.ngx-datex-nav-button mat-icon{font-size:18px;width:18px;height:18px;color:inherit}.ngx-datex-month-year{display:flex;align-items:center;gap:4px;font-weight:500;font-size:12px}@media(max-width:768px){.ngx-datex-month-year{font-size:16px;font-weight:600;gap:8px}}.ngx-datex-month-select,.ngx-datex-year-select{border:1px solid #e0e0e0;border-radius:3px;padding:1px 2px;font-size:12px;background:#fff;cursor:pointer;color:#212121;height:auto;margin:0;outline:none;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:20px}@media(max-width:768px){.ngx-datex-month-select,.ngx-datex-year-select{font-size:14px;padding:4px 8px;border-radius:6px;min-height:32px;border:2px solid #e0e0e0}}.ngx-datex-month-select:focus,.ngx-datex-year-select:focus{outline:none;border-color:#1976d2;box-shadow:0 0 0 2px #1976d233}.ngx-datex-month-select option,.ngx-datex-year-select option{background:#fff;color:#212121}.ngx-datex-month-select{margin-right:2%;width:56%;min-width:50px}.ngx-datex-year-select{width:40%;min-width:50px}.ngx-datex-days-header{display:table;width:100%;margin-bottom:0;border-collapse:collapse;border-spacing:0}@media(max-width:768px){.ngx-datex-days-header{width:100%;margin:0 0 8px;padding:0}}.ngx-datex-days-header-row{display:table-row}.ngx-datex-day-header{display:table-cell;text-align:center;font-size:12px;font-weight:500;width:14.28%;height:28px;line-height:28px;background:#fff;color:#212121;box-sizing:border-box;vertical-align:middle;padding:0}@media(max-width:768px){.ngx-datex-day-header{height:36px;line-height:36px;font-size:13px;font-weight:600;background:#f8f9fa;color:#495057;border-bottom:1px solid #e0e0e0}}.ngx-datex-calendar-grid{display:table;width:100%;margin:0;padding:0;border-collapse:collapse;border-spacing:0;table-layout:fixed}@media(max-width:768px){.ngx-datex-calendar-grid{border-radius:0;overflow:visible;width:100%;margin:0;padding:0}}.ngx-datex-week{display:table-row}.ngx-datex-day{display:table-cell;width:14.28%;height:28px;text-align:center;font-size:12px;padding:0;margin:0;box-sizing:border-box;border:1px solid transparent;background:#fff;cursor:pointer}@media(max-width:768px){.ngx-datex-day{height:40px;font-size:15px;font-weight:500;line-height:40px;vertical-align:middle;border:1px solid #f0f0f0}}.ngx-datex-day{transition:all .15s ease;position:relative;border-radius:4px;line-height:28px;white-space:nowrap;color:#212121;vertical-align:middle}.ngx-datex-day:hover:not(:disabled){background:#f5f5f5;color:#212121}.ngx-datex-day.ngx-datex-day-other-month{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:inherit!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-today{font-weight:700;background:#1976d21a;color:#1976d2}.ngx-datex-day.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-active{background-color:#1976d2;border-color:transparent;color:#fff}.ngx-datex-day.ngx-datex-day-selected:hover,.ngx-datex-day.ngx-datex-day-active:hover{background-color:#1976d2;opacity:.9}.ngx-datex-day.ngx-datex-day-in-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-range-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-range-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-range-start.ngx-datex-day-range-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-hover-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-hover-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-hover-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-hover-start.ngx-datex-day-hover-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-disabled{color:#bdbdbd;cursor:not-allowed;text-decoration:line-through}.ngx-datex-day.ngx-datex-day-disabled:hover{background:#fff;color:#bdbdbd}.ngx-datex-footer{padding:8px;border-top:1px solid #e0e0e0;background:#fff;border-radius:0 0 8px 8px;display:flex;justify-content:space-between;align-items:center;line-height:10px;vertical-align:middle;margin:0}.ngx-datex-selected-range{font-size:12px;color:#212121;font-weight:400;display:inline-block;padding-right:8px}.ngx-datex-footer-buttons{display:flex;gap:4px}.ngx-datex-cancel-button,.ngx-datex-apply-button{min-width:70px;font-weight:700;font-size:12px;padding:7px 8px;border-radius:3px;border:1px solid transparent;cursor:pointer;transition:all .15s ease-in-out;margin-left:4px}.ngx-datex-cancel-button{background-color:#dc3545;border-color:#dc3545;color:#fff}.ngx-datex-cancel-button:hover:not(:disabled){background-color:#dc3545;border-color:#dc3545;opacity:.8}.ngx-datex-apply-button{background-color:#22c55e;border-color:#22c55e;color:#fff}.ngx-datex-apply-button:disabled{background:#9ca3af;border-color:#9ca3af;opacity:.6;cursor:not-allowed}.ngx-datex-apply-button:hover:not(:disabled){background-color:#22c55e;border-color:#22c55e;opacity:.8}.ngx-datex-mobile .ngx-datex-overlay{position:fixed;inset:auto 0 0;width:100%;max-width:100vw;min-width:100vw;border-radius:12px 12px 0 0;margin:0;max-height:85vh;overflow-y:auto;z-index:999999;box-shadow:0 -4px 20px #00000026}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:none}.ngx-datex-mobile .ngx-datex-content{flex-direction:column}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:100%;border-right:none;border-bottom:1px solid #e0e0e0;border-radius:12px 12px 0 0;flex-direction:row;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar::-webkit-scrollbar{display:none}.ngx-datex-mobile .ngx-datex-range-item{white-space:nowrap;padding:8px 12px;margin:0 4px;border-radius:20px;background-color:#f5f5f5;border:1px solid #e0e0e0;flex:0 0 auto;min-width:60px;text-align:center;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.ngx-datex-mobile .ngx-datex-range-item:hover{background-color:#1976d21a;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.ngx-datex-mobile .ngx-datex-range-item.ngx-datex-range-active{background-color:#1976d2;color:#fff;border-color:#1976d2;font-weight:600}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:column;padding:6px}.ngx-datex-mobile .ngx-datex-calendar{width:100%;padding:6px}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;height:28px;line-height:28px;font-size:11px;font-weight:600;text-align:center;padding:0;margin:0;box-sizing:border-box;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;height:40px;line-height:40px;font-size:15px;font-weight:500;border-radius:6px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-footer{display:none}.ngx-datex-mobile-header{width:100%;background-color:#fff;color:#333;border-radius:16px 16px 0 0;box-sizing:border-box;position:relative;z-index:3;border-bottom:1px solid #e0e0e0;display:flex;flex-direction:column;gap:0;padding:12px 0 8px}.ngx-datex-mobile-header-content{padding:0 16px 8px;text-align:center;flex:1}.ngx-datex-mobile-header-buttons{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 0;gap:12px;border-top:1px solid #f0f0f0;background-color:#fff}.ngx-datex-mobile-selected-range{display:block;font-size:16px;font-weight:600;line-height:1.3;color:#1a1a1a;margin-bottom:2px}.ngx-datex-mobile-range-label{display:block;font-size:13px;font-weight:500;color:#2196f3;margin-top:2px}.ngx-datex-mobile-cancel-button,.ngx-datex-mobile-apply-button{flex:1;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease;border:2px solid transparent;text-transform:none;letter-spacing:0;min-height:40px;display:flex;align-items:center;justify-content:center}.ngx-datex-mobile-cancel-button{background:#dc3545;border:2px solid #dc3545;color:#fff}.ngx-datex-mobile-cancel-button:hover{background:#c82333;border-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 12px #dc35454d}.ngx-datex-mobile-cancel-button:active{transform:translateY(0);box-shadow:0 2px 4px #dc354533}.ngx-datex-mobile-apply-button{background:#28a745;border:2px solid #28a745;color:#fff}.ngx-datex-mobile-apply-button:hover{background:#218838;border-color:#218838;transform:translateY(-1px);box-shadow:0 4px 16px #28a7454d}.ngx-datex-mobile-apply-button:active{transform:translateY(0);box-shadow:0 2px 8px #28a74533}.ngx-datex-mobile-apply-button:disabled{background:#e0e0e0;border-color:#e0e0e0;color:#9e9e9e;cursor:not-allowed;transform:none;box-shadow:none}.ngx-datex-day:focus{outline:2px solid #1976d2;outline-offset:-2px;z-index:1}.ngx-datex-nav-button:focus{outline:2px solid #1976d2;outline-offset:2px}.ngx-datex-range-item:focus{outline:2px solid #1976d2;outline-offset:-2px}.ngx-datex-overlay{animation:fadeInScale .2s ease-out}.ngx-datex-overlay:before,.ngx-datex-overlay:after{animation:fadeInArrow .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:after{animation:fadeInArrowCenterHorizontal .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:after{animation:fadeInArrowCenterVertical .2s ease-out .1s both}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes fadeInArrow{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes fadeInArrowCenterHorizontal{0%{opacity:0;transform:translate(-50%) scale(.8)}to{opacity:1;transform:translate(-50%) scale(1)}}@keyframes fadeInArrowCenterVertical{0%{opacity:0;transform:translateY(-50%) scale(.8)}to{opacity:1;transform:translateY(-50%) scale(1)}}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-right{display:none}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-left{padding:8px}.ngx-datex-time-picker{border-top:1px solid #e0e0e0;padding:8px;background:#fff;margin-top:8px}.ngx-datex-time-controls{display:flex;justify-content:center;align-items:center;gap:4px;flex-wrap:nowrap}.ngx-datex-time-separator{font-size:14px;font-weight:700;color:#333;margin:0 2px;line-height:1}.ngx-datex-time-select{border:1px solid #ccc;border-radius:3px;padding:2px 4px;font-size:11px;background:#fff;color:#333;outline:none;cursor:pointer;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:22px;line-height:1}.ngx-datex-time-select:focus{border-color:#1976d2;box-shadow:0 0 0 1px #1976d233}.ngx-datex-time-select:disabled{background:#f5f5f5;color:#999;cursor:not-allowed;opacity:.6}.ngx-datex-time-select option{padding:2px 4px;font-size:11px}.ngx-datex-hour-select,.ngx-datex-minute-select{width:50px;text-align:center}.ngx-datex-ampm-select{width:45px;text-align:center}.ngx-datex-mobile .ngx-datex-time-picker{margin-top:12px;padding:12px}.ngx-datex-mobile .ngx-datex-time-controls{gap:6px}.ngx-datex-mobile .ngx-datex-time-separator{font-size:16px;margin:0 4px}.ngx-datex-mobile .ngx-datex-time-select{font-size:14px;padding:4px 6px;min-height:32px;border-radius:4px}.ngx-datex-mobile .ngx-datex-hour-select,.ngx-datex-mobile .ngx-datex-minute-select{width:60px}.ngx-datex-mobile .ngx-datex-ampm-select{width:55px}@media(min-width:564px)and (max-width:768px){.ngx-datex-overlay.ngx-datex-overlay-mobile{position:fixed;width:90%;max-width:500px;inset:auto auto 20px 50%;transform:translate(-50%);border-radius:8px}}@media(min-width:564px){.ngx-datex-mobile .ngx-datex-overlay{position:absolute;inset:100% auto auto 0;width:650px;max-width:90vw;border-radius:8px;margin-top:7px;max-height:none}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:inline-block}.ngx-datex-mobile .ngx-datex-footer{display:flex}.ngx-datex-mobile .ngx-datex-mobile-header{display:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:140px;flex-direction:column;border-right:1px solid #e0e0e0;border-bottom:none;border-radius:8px 0 0 8px;overflow-x:visible;padding:0}.ngx-datex-mobile .ngx-datex-range-item{white-space:normal;padding:8px 12px;margin:2px 0;border-radius:0;background:none;border:none;text-align:left;min-width:auto}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:row;padding:0}.ngx-datex-mobile .ngx-datex-calendar{padding:8px 0 8px 8px}.ngx-datex-mobile .ngx-datex-calendar.ngx-datex-calendar-right{padding:8px 8px 8px 0}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;box-sizing:border-box;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;border-radius:4px;box-sizing:border-box;text-align:center;vertical-align:middle}}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover,.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}\n"] }]
|
|
4041
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ngx-datex-container\" [class.ngx-datex-mobile]=\"isMobileDevice()\">\r\n <!-- Input Field -->\r\n <mat-form-field\r\n [appearance]=\"appearance()\"\r\n [floatLabel]=\"floatLabel()\"\r\n class=\"ngx-datex-input-field\"\r\n >\r\n @if (label()) {\r\n <mat-label>{{ label() }}</mat-label>\r\n }\r\n\r\n <!-- Checkbox como prefix -->\r\n @if (showCheckbox() && checkboxPosition() === 'prefix') {\r\n <mat-checkbox\r\n matPrefix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-prefix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n <!-- \u00CDcono como prefix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'prefix') {\r\n <mat-icon\r\n matPrefix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <input\r\n matInput\r\n #inputElement\r\n [value]=\"displayValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-describedby]=\"ariaDescribedBy()\"\r\n (click)=\"onInputClick()\"\r\n (focus)=\"onInputFocus()\"\r\n (blur)=\"onInputBlur()\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n (keyup)=\"onInputKeyup()\"\r\n autocomplete=\"off\"\r\n />\r\n\r\n <!-- \u00CDcono como suffix -->\r\n @if (showCalendarIcon() && calendarIconPosition() === 'suffix') {\r\n <mat-icon\r\n matSuffix\r\n class=\"ngx-datex-calendar-icon\"\r\n [class.ngx-datex-icon-active]=\"isOpen()\"\r\n (click)=\"toggle()\"\r\n (keydown.enter)=\"toggle()\"\r\n (keydown.space)=\"toggle()\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Open calendar'\"\r\n >\r\n {{ calendarIcon() }}\r\n </mat-icon>\r\n }\r\n\r\n <!-- Checkbox como suffix -->\r\n @if (showCheckbox() && checkboxPosition() === 'suffix') {\r\n <mat-checkbox\r\n matSuffix\r\n [checked]=\"checkboxValue()\"\r\n (change)=\"onCheckboxChange($event.checked)\"\r\n (click)=\"$event.stopPropagation()\"\r\n class=\"ngx-datex-checkbox ngx-datex-checkbox-suffix\"\r\n >\r\n </mat-checkbox>\r\n }\r\n\r\n @if (hasError()) {\r\n <mat-error>{{ errorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <!-- Calendar Template for CDK Overlay -->\r\n <ng-template #calendarTemplate>\r\n <div\r\n class=\"ngx-datex-overlay\"\r\n [class.ngx-datex-overlay-mobile]=\"isMobileDevice()\"\r\n [class.ngx-datex-single]=\"singleDatePicker()\"\r\n [class.ngx-datex-arrow-up]=\"arrowDirection() === 'up'\"\r\n [class.ngx-datex-arrow-down]=\"arrowDirection() === 'down'\"\r\n [class.ngx-datex-arrow-left]=\"arrowDirection() === 'left'\"\r\n [class.ngx-datex-arrow-right]=\"arrowDirection() === 'right'\"\r\n [class.ngx-datex-arrow-align-start]=\"arrowAlignment() === 'start'\"\r\n [class.ngx-datex-arrow-align-center]=\"arrowAlignment() === 'center'\"\r\n [class.ngx-datex-arrow-align-end]=\"arrowAlignment() === 'end'\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"headerTitle()\"\r\n tabindex=\"-1\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"onCalendarKeydown($event)\"\r\n >\r\n <!-- Mobile Header (only shown on mobile) -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-mobile-header\">\r\n <div class=\"ngx-datex-mobile-header-content\">\r\n <div class=\"ngx-datex-mobile-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-mobile-range-label\">\r\n @if (currentLabel()) {\r\n {{ currentLabel() }}\r\n }\r\n </div>\r\n </div>\r\n <div class=\"ngx-datex-mobile-header-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-mobile-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"ngx-datex-content\">\r\n <!-- Predefined Ranges - Desktop: Sidebar, Mobile: Horizontal Chips -->\r\n @if (showRanges()) {\r\n <!-- Desktop Ranges Sidebar -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-sidebar\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-item\"\r\n [class.ngx-datex-range-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Rango Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Mobile Ranges Chips -->\r\n @if (isMobileDevice()) {\r\n <div class=\"ngx-datex-ranges-chips\">\r\n <div class=\"ngx-datex-ranges-chips-container\">\r\n @for (rangeEntry of rangeEntries(); track rangeEntry.label) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isRangeActive(rangeEntry.label)\"\r\n (click)=\"selectRange(rangeEntry.label)\"\r\n >\r\n {{ rangeEntry.label }}\r\n </button>\r\n }\r\n <!-- Rango Personalizado -->\r\n @if (showCustomRangeLabel()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-range-chip\"\r\n [class.ngx-datex-range-chip-active]=\"isCustomRange()\"\r\n (click)=\"selectCustomRange()\"\r\n >\r\n {{ locale().customRangeLabel || 'Personalizado' }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Calendar Section -->\r\n <div class=\"ngx-datex-calendar-section\">\r\n <!-- Calendar Container -->\r\n <div class=\"ngx-datex-calendars\" (mouseleave)=\"onCalendarMouseLeave()\">\r\n <!-- Left Calendar -->\r\n <div\r\n class=\"ngx-datex-calendar ngx-datex-calendar-left\"\r\n [class.ngx-datex-calendar-single]=\"singleDatePicker()\"\r\n >\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('left')\"\r\n [disabled]=\"!canNavigatePrevious('left')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"leftCalendarMonthValue()\"\r\n (change)=\"onMonthChange('left', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"leftCalendarYearValue()\"\r\n (change)=\"onYearChange('left', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[leftCalendarMonthValue()] }} {{ leftCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('left')\"\r\n [disabled]=\"!canNavigateNext('left')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of leftCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"isOtherMonth(date, leftCalendarMonth())\"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Left Calendar -->\r\n @if (timePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedStartHour()\"\r\n (change)=\"onStartHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableStartHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedStartHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedStartMinute()\"\r\n (change)=\"onStartMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableStartMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedStartMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedStartAmPm()\"\r\n (change)=\"onStartAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Right Calendar (for range picker) -->\r\n @if (!singleDatePicker()) {\r\n <div class=\"ngx-datex-calendar ngx-datex-calendar-right\">\r\n <div class=\"ngx-datex-calendar-header\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"previousMonth('right')\"\r\n [disabled]=\"!canNavigatePrevious('right')\"\r\n aria-label=\"Mes anterior\"\r\n >\r\n <mat-icon>chevron_left</mat-icon>\r\n </button>\r\n\r\n <div class=\"ngx-datex-month-year\">\r\n @if (showDropdowns()) {\r\n <select\r\n class=\"ngx-datex-month-select\"\r\n [value]=\"rightCalendarMonthValue()\"\r\n (change)=\"onMonthChange('right', $event)\"\r\n aria-label=\"Seleccionar mes\"\r\n >\r\n @for (month of monthNames(); track $index) {\r\n <option [value]=\"$index\">{{ month }}</option>\r\n }\r\n </select>\r\n\r\n <select\r\n class=\"ngx-datex-year-select\"\r\n [value]=\"rightCalendarYearValue()\"\r\n (change)=\"onYearChange('right', $event)\"\r\n aria-label=\"Seleccionar a\u00F1o\"\r\n >\r\n @for (year of availableYears(); track year) {\r\n <option [value]=\"year\">{{ year }}</option>\r\n }\r\n </select>\r\n } @else {\r\n <span class=\"ngx-datex-month-year-display\">\r\n {{ monthNames()[rightCalendarMonthValue()] }} {{ rightCalendarYearValue() }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-nav-button\"\r\n (click)=\"nextMonth('right')\"\r\n [disabled]=\"!canNavigateNext('right')\"\r\n aria-label=\"Mes siguiente\"\r\n >\r\n <mat-icon>chevron_right</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <!-- Days of Week Header -->\r\n <div class=\"ngx-datex-days-header\">\r\n <div class=\"ngx-datex-days-header-row\">\r\n @for (day of daysOfWeek(); track day) {\r\n <div class=\"ngx-datex-day-header\">{{ day }}</div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Calendar Grid -->\r\n <div class=\"ngx-datex-calendar-grid\">\r\n @for (week of rightCalendarMatrix(); track $index) {\r\n <div class=\"ngx-datex-week\">\r\n @for (date of week; track date.getTime()) {\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-day\"\r\n [class.ngx-datex-day-other-month]=\"\r\n isOtherMonth(date, rightCalendarMonth())\r\n \"\r\n [class.ngx-datex-day-today]=\"isToday(date)\"\r\n [class.ngx-datex-day-selected]=\"isSelected(date)\"\r\n [class.ngx-datex-day-active]=\"isSelected(date)\"\r\n [class.ngx-datex-day-in-range]=\"isInRange(date)\"\r\n [class.ngx-datex-day-range-start]=\"isRangeStart(date)\"\r\n [class.ngx-datex-day-range-end]=\"isRangeEnd(date)\"\r\n [class.ngx-datex-day-hover-range]=\"\r\n isHovered(date) && !isHoverStart(date) && !isHoverEnd(date)\r\n \"\r\n [class.ngx-datex-day-hover-start]=\"isHoverStart(date)\"\r\n [class.ngx-datex-day-hover-end]=\"isHoverEnd(date)\"\r\n [class.ngx-datex-day-disabled]=\"isDisabled(date)\"\r\n [disabled]=\"isDisabled(date)\"\r\n (click)=\"selectDate(date)\"\r\n (mouseenter)=\"onDateHover(date)\"\r\n [attr.aria-label]=\"formatDateForAria(date)\"\r\n >\r\n {{ date.getDate() }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Time Picker for Right Calendar -->\r\n @if (timePicker() && !singleDatePicker()) {\r\n <div class=\"ngx-datex-time-picker\">\r\n <div class=\"ngx-datex-time-controls\">\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-hour-select\"\r\n [value]=\"selectedEndHour()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndHourChange($event)\"\r\n aria-label=\"Seleccionar hora\"\r\n >\r\n @if (timePicker24Hour()) {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n } @else {\r\n @for (hourOption of availableEndHours(); track hourOption.value) {\r\n <option\r\n [value]=\"hourOption.value\"\r\n [selected]=\"selectedEndHour() === hourOption.value\"\r\n [disabled]=\"hourOption.disabled\"\r\n >\r\n {{ hourOption.value }}\r\n </option>\r\n }\r\n }\r\n </select>\r\n\r\n <span class=\"ngx-datex-time-separator\">:</span>\r\n\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-minute-select\"\r\n [value]=\"selectedEndMinute()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndMinuteChange($event)\"\r\n aria-label=\"Seleccionar minuto\"\r\n >\r\n @for (minuteOption of availableEndMinutes(); track minuteOption.value) {\r\n <option\r\n [value]=\"minuteOption.value\"\r\n [selected]=\"selectedEndMinute() === minuteOption.value\"\r\n [disabled]=\"minuteOption.disabled\"\r\n >\r\n {{ minuteOption.value.toString().padStart(2, '0') }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (!timePicker24Hour()) {\r\n <select\r\n class=\"ngx-datex-time-select ngx-datex-ampm-select\"\r\n [value]=\"selectedEndAmPm()\"\r\n [disabled]=\"!hasEndDate()\"\r\n (change)=\"onEndAmPmChange($event)\"\r\n aria-label=\"Seleccionar AM/PM\"\r\n >\r\n <option value=\"AM\">AM</option>\r\n <option value=\"PM\">PM</option>\r\n </select>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Footer with selected range and buttons (desktop only) -->\r\n @if (!isMobileDevice()) {\r\n <div class=\"ngx-datex-footer\">\r\n <div class=\"ngx-datex-selected-range\">\r\n @if (hasStartDate()) {\r\n {{ formattedSelectedRange() }}\r\n } @else {\r\n Selecciona un rango de fechas\r\n }\r\n </div>\r\n <div class=\"ngx-datex-footer-buttons\">\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-cancel-button\"\r\n [ngClass]=\"[buttonClasses(), cancelButtonClasses()]\"\r\n (click)=\"cancel()\"\r\n >\r\n {{ locale().cancelLabel || 'Cancelar' }}\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"ngx-datex-apply-button\"\r\n [ngClass]=\"[buttonClasses(), applyButtonClasses()]\"\r\n [disabled]=\"!canApplyValue()\"\r\n (click)=\"apply()\"\r\n >\r\n {{ locale().applyLabel || 'Aplicar' }}\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".ngx-datex-container{position:relative;display:inline-block;width:100%}.ngx-datex-input-field{width:100%}.ngx-datex-calendar-icon{cursor:pointer;transition:color .2s ease;font-size:20px}.ngx-datex-calendar-icon:hover,.ngx-datex-calendar-icon.ngx-datex-icon-active{color:var(--ngx-datex-primary-color, #1976d2)}.ngx-datex-overlay-panel{z-index:1000}.ngx-datex-mobile-overlay{z-index:1001}.ngx-datex-overlay{background:#fff;border-radius:8px;box-shadow:0 5px 15px #00000026,0 2px 4px #0000001f;border:1px solid #e0e0e0;width:650px;font-family:Roboto,sans-serif;font-size:12px;line-height:1em;position:relative;color:#212121}.ngx-datex-overlay:before,.ngx-datex-overlay:after{position:absolute;content:\"\";display:none;z-index:10}.ngx-datex-overlay.ngx-datex-arrow-down:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #e0e0e0;top:-7px}.ngx-datex-overlay.ngx-datex-arrow-down:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;top:-6px}.ngx-datex-overlay.ngx-datex-arrow-up:before{display:block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #e0e0e0;bottom:-7px}.ngx-datex-overlay.ngx-datex-arrow-up:after{display:block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #ffffff;bottom:-6px}.ngx-datex-overlay.ngx-datex-arrow-right:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #e0e0e0;left:-7px}.ngx-datex-overlay.ngx-datex-arrow-right:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #ffffff;left:-6px}.ngx-datex-overlay.ngx-datex-arrow-left:before{display:block;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #e0e0e0;right:-7px}.ngx-datex-overlay.ngx-datex-arrow-left:after{display:block;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #ffffff;right:-6px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:before{left:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-start:after{left:21px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:before{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-center:after{left:50%;transform:translate(-50%)}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:before{right:20px}.ngx-datex-overlay.ngx-datex-arrow-up.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-down.ngx-datex-arrow-align-end:after{right:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:before{top:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-start:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-start:after{top:21px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:before{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-center:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-center:after{top:50%;transform:translateY(-50%)}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:before,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:before{bottom:20px}.ngx-datex-overlay.ngx-datex-arrow-left.ngx-datex-arrow-align-end:after,.ngx-datex-overlay.ngx-datex-arrow-right.ngx-datex-arrow-align-end:after{bottom:21px}.ngx-datex-overlay.ngx-datex-single{width:300px}.ngx-datex-overlay.ngx-datex-single .ngx-datex-ranges-sidebar{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile{width:100vw;max-width:100vw;min-width:100vw;border-radius:16px 16px 0 0;max-height:90vh;overflow-y:auto;box-shadow:0 -8px 32px #0003;border:none;margin:0;padding:0}.ngx-datex-overlay.ngx-datex-overlay-mobile:before,.ngx-datex-overlay.ngx-datex-overlay-mobile:after{display:none}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-content{min-height:auto;padding:0;margin:0;width:100%;display:flex;flex-direction:column}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar-section{padding:0;margin:0;width:100%;flex:1}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendars{padding:16px;gap:20px;margin:0;width:100%;box-sizing:border-box}.ngx-datex-overlay.ngx-datex-overlay-mobile .ngx-datex-calendar{padding:0;margin:0;border-radius:0;background:transparent;border:none;box-shadow:none;width:100%}.ngx-datex-content{display:flex;min-height:350px}.ngx-datex-ranges-sidebar{width:140px;background:#fff;border-right:1px solid #e0e0e0;padding:0;border-radius:8px 0 0 8px;display:flex;flex-direction:column}.ngx-datex-range-item{background:none;border:none;padding:8px 12px;text-align:left;cursor:pointer;font-size:12px;color:#212121;transition:all .2s ease;border-radius:0;margin:2px 0}.ngx-datex-range-item:hover{background:#f5f5f5;color:#1976d2}.ngx-datex-range-item.ngx-datex-range-active{background:#1976d2;color:#fff;font-weight:500}.ngx-datex-ranges-chips{width:100%;background:#fff;border-bottom:1px solid #e0e0e0;padding:16px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-ranges-chips::-webkit-scrollbar{display:none}.ngx-datex-ranges-chips-container{display:flex;gap:12px;padding:0 16px;min-width:max-content}.ngx-datex-range-chip{background:#f8f9fa;border:1px solid #dee2e6;border-radius:20px;padding:10px 16px;font-size:14px;font-weight:500;color:#495057;cursor:pointer;transition:all .3s ease;white-space:nowrap;flex-shrink:0;min-height:40px;display:flex;align-items:center;justify-content:center;min-width:80px;text-align:center}.ngx-datex-range-chip:hover{background:#e3f2fd;border-color:#2196f3;color:#1976d2;transform:translateY(-2px);box-shadow:0 4px 12px #2196f340}.ngx-datex-range-chip.ngx-datex-range-chip-active{background:linear-gradient(135deg,#2196f3,#1976d2);border-color:#1976d2;color:#fff;font-weight:600;box-shadow:0 4px 16px #1976d266;transform:translateY(-1px)}.ngx-datex-range-chip:active{transform:translateY(0)}.ngx-datex-calendar-section{flex:1;display:flex;flex-direction:column}@media(max-width:768px){.ngx-datex-ranges-chips+.ngx-datex-calendar-section{padding-top:0}.ngx-datex-calendar-section{padding:0;background:#fff;width:100%;margin:0}}.ngx-datex-calendars{display:flex;padding:0;gap:0;flex:1}@media(max-width:768px){.ngx-datex-calendars{flex-direction:column;gap:16px;padding:12px;width:100%;margin:0;box-sizing:border-box}}.ngx-datex-calendar{flex:1;padding:8px;min-width:0}.ngx-datex-calendar.ngx-datex-calendar-right{padding:8px}@media(max-width:768px){.ngx-datex-calendar{padding:0;background:transparent;border:none;box-shadow:none;width:100%;flex:none;min-width:unset;box-sizing:border-box;margin:0}.ngx-datex-calendar .ngx-datex-calendar-grid{width:100%;margin:0}.ngx-datex-calendar .ngx-datex-week{width:100%;display:table-row;margin:0}.ngx-datex-calendar .ngx-datex-day{display:table-cell;width:14.28%;margin:0;padding:0}.ngx-datex-calendar .ngx-datex-days-header{width:100%;margin:0 0 8px}.ngx-datex-calendar .ngx-datex-calendar-header{margin:0 0 16px;padding:0}}.ngx-datex-calendar.ngx-datex-calendar-single{padding:8px}.ngx-datex-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding:0;height:28px}@media(max-width:768px){.ngx-datex-calendar-header{height:40px;margin-bottom:12px;padding:0 4px}}.ngx-datex-nav-button{background:none;border:none;cursor:pointer;padding:4px;border-radius:3px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease;color:#757575;width:32px;height:28px}@media(max-width:768px){.ngx-datex-nav-button{width:40px;height:40px;border-radius:6px;background:#f5f5f5}.ngx-datex-nav-button mat-icon{font-size:18px}}.ngx-datex-nav-button:hover:not(:disabled){background:#f5f5f5;color:#1976d2}.ngx-datex-nav-button:disabled{opacity:.5;cursor:not-allowed}.ngx-datex-nav-button mat-icon{font-size:18px;width:18px;height:18px;color:inherit}.ngx-datex-month-year{display:flex;align-items:center;gap:4px;font-weight:500;font-size:12px}@media(max-width:768px){.ngx-datex-month-year{font-size:16px;font-weight:600;gap:8px}}.ngx-datex-month-select,.ngx-datex-year-select{border:1px solid #e0e0e0;border-radius:3px;padding:1px 2px;font-size:12px;background:#fff;cursor:pointer;color:#212121;height:auto;margin:0;outline:none;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:20px}@media(max-width:768px){.ngx-datex-month-select,.ngx-datex-year-select{font-size:14px;padding:4px 8px;border-radius:6px;min-height:32px;border:2px solid #e0e0e0}}.ngx-datex-month-select:focus,.ngx-datex-year-select:focus{outline:none;border-color:#1976d2;box-shadow:0 0 0 2px #1976d233}.ngx-datex-month-select option,.ngx-datex-year-select option{background:#fff;color:#212121}.ngx-datex-month-select{margin-right:2%;width:56%;min-width:50px}.ngx-datex-year-select{width:40%;min-width:50px}.ngx-datex-days-header{display:table;width:100%;margin-bottom:0;border-collapse:collapse;border-spacing:0}@media(max-width:768px){.ngx-datex-days-header{width:100%;margin:0 0 8px;padding:0}}.ngx-datex-days-header-row{display:table-row}.ngx-datex-day-header{display:table-cell;text-align:center;font-size:12px;font-weight:500;width:14.28%;height:28px;line-height:28px;background:#fff;color:#212121;box-sizing:border-box;vertical-align:middle;padding:0}@media(max-width:768px){.ngx-datex-day-header{height:36px;line-height:36px;font-size:13px;font-weight:600;background:#f8f9fa;color:#495057;border-bottom:1px solid #e0e0e0}}.ngx-datex-calendar-grid{display:table;width:100%;margin:0;padding:0;border-collapse:collapse;border-spacing:0;table-layout:fixed}@media(max-width:768px){.ngx-datex-calendar-grid{border-radius:0;overflow:visible;width:100%;margin:0;padding:0}}.ngx-datex-week{display:table-row}.ngx-datex-day{display:table-cell;width:14.28%;height:28px;text-align:center;font-size:12px;padding:0;margin:0;box-sizing:border-box;border:1px solid transparent;background:#fff;cursor:pointer}@media(max-width:768px){.ngx-datex-day{height:40px;font-size:15px;font-weight:500;line-height:40px;vertical-align:middle;border:1px solid #f0f0f0}}.ngx-datex-day{transition:all .15s ease;position:relative;border-radius:4px;line-height:28px;white-space:nowrap;color:#212121;vertical-align:middle}.ngx-datex-day:hover:not(:disabled){background:#f5f5f5;color:#212121}.ngx-datex-day.ngx-datex-day-other-month{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:inherit!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-today{font-weight:700;background:#1976d21a;color:#1976d2}.ngx-datex-day.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-active{background-color:#1976d2;border-color:transparent;color:#fff}.ngx-datex-day.ngx-datex-day-selected:hover,.ngx-datex-day.ngx-datex-day-active:hover{background-color:#1976d2;opacity:.9}.ngx-datex-day.ngx-datex-day-in-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-range-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-range-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-range-start.ngx-datex-day-range-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-hover-range{background-color:#ebf4f8;border-color:transparent;color:#212121;border-radius:0}.ngx-datex-day.ngx-datex-day-hover-start{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:4px 0 0 4px}.ngx-datex-day.ngx-datex-day-hover-end{background-color:#1976d2;border-color:transparent;color:#fff;border-radius:0 4px 4px 0}.ngx-datex-day.ngx-datex-day-hover-start.ngx-datex-day-hover-end{border-radius:4px}.ngx-datex-day.ngx-datex-day-disabled{color:#bdbdbd;cursor:not-allowed;text-decoration:line-through}.ngx-datex-day.ngx-datex-day-disabled:hover{background:#fff;color:#bdbdbd}.ngx-datex-footer{padding:8px;border-top:1px solid #e0e0e0;background:#fff;border-radius:0 0 8px 8px;display:flex;justify-content:space-between;align-items:center;line-height:10px;vertical-align:middle;margin:0}.ngx-datex-selected-range{font-size:12px;color:#212121;font-weight:400;display:inline-block;padding-right:8px}.ngx-datex-footer-buttons{display:flex;gap:4px}.ngx-datex-cancel-button,.ngx-datex-apply-button{min-width:70px;font-weight:700;font-size:12px;padding:7px 8px;border-radius:3px;border:1px solid transparent;cursor:pointer;transition:all .15s ease-in-out;margin-left:4px}.ngx-datex-cancel-button{background-color:#dc3545;border-color:#dc3545;color:#fff}.ngx-datex-cancel-button:hover:not(:disabled){background-color:#dc3545;border-color:#dc3545;opacity:.8}.ngx-datex-apply-button{background-color:#22c55e;border-color:#22c55e;color:#fff}.ngx-datex-apply-button:disabled{background:#9ca3af;border-color:#9ca3af;opacity:.6;cursor:not-allowed}.ngx-datex-apply-button:hover:not(:disabled){background-color:#22c55e;border-color:#22c55e;opacity:.8}.ngx-datex-mobile .ngx-datex-overlay{position:fixed;inset:auto 0 0;width:100%;max-width:100vw;min-width:100vw;border-radius:12px 12px 0 0;margin:0;max-height:85vh;overflow-y:auto;z-index:999999;box-shadow:0 -4px 20px #00000026}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:none}.ngx-datex-mobile .ngx-datex-content{flex-direction:column}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:100%;border-right:none;border-bottom:1px solid #e0e0e0;border-radius:12px 12px 0 0;flex-direction:row;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar::-webkit-scrollbar{display:none}.ngx-datex-mobile .ngx-datex-range-item{white-space:nowrap;padding:8px 12px;margin:0 4px;border-radius:20px;background-color:#f5f5f5;border:1px solid #e0e0e0;flex:0 0 auto;min-width:60px;text-align:center;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.ngx-datex-mobile .ngx-datex-range-item:hover{background-color:#1976d21a;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.ngx-datex-mobile .ngx-datex-range-item.ngx-datex-range-active{background-color:#1976d2;color:#fff;border-color:#1976d2;font-weight:600}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:column;padding:6px}.ngx-datex-mobile .ngx-datex-calendar{width:100%;padding:6px}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;height:28px;line-height:28px;font-size:11px;font-weight:600;text-align:center;padding:0;margin:0;box-sizing:border-box;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;height:40px;line-height:40px;font-size:15px;font-weight:500;border-radius:6px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-footer{display:none}.ngx-datex-mobile-header{width:100%;background-color:#fff;color:#333;border-radius:16px 16px 0 0;box-sizing:border-box;position:relative;z-index:3;border-bottom:1px solid #e0e0e0;display:flex;flex-direction:column;gap:0;padding:12px 0 8px}.ngx-datex-mobile-header-content{padding:0 16px 8px;text-align:center;flex:1}.ngx-datex-mobile-header-buttons{display:flex;justify-content:space-between;align-items:center;padding:8px 16px 0;gap:12px;border-top:1px solid #f0f0f0;background-color:#fff}.ngx-datex-mobile-selected-range{display:block;font-size:16px;font-weight:600;line-height:1.3;color:#1a1a1a;margin-bottom:2px}.ngx-datex-mobile-range-label{display:block;font-size:13px;font-weight:500;color:#2196f3;margin-top:2px}.ngx-datex-mobile-cancel-button,.ngx-datex-mobile-apply-button{flex:1;padding:10px 16px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease;border:2px solid transparent;text-transform:none;letter-spacing:0;min-height:40px;display:flex;align-items:center;justify-content:center}.ngx-datex-mobile-cancel-button{background:#dc3545;border:2px solid #dc3545;color:#fff}.ngx-datex-mobile-cancel-button:hover{background:#c82333;border-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 12px #dc35454d}.ngx-datex-mobile-cancel-button:active{transform:translateY(0);box-shadow:0 2px 4px #dc354533}.ngx-datex-mobile-apply-button{background:#28a745;border:2px solid #28a745;color:#fff}.ngx-datex-mobile-apply-button:hover{background:#218838;border-color:#218838;transform:translateY(-1px);box-shadow:0 4px 16px #28a7454d}.ngx-datex-mobile-apply-button:active{transform:translateY(0);box-shadow:0 2px 8px #28a74533}.ngx-datex-mobile-apply-button:disabled{background:#e0e0e0;border-color:#e0e0e0;color:#9e9e9e;cursor:not-allowed;transform:none;box-shadow:none}.ngx-datex-day:focus{outline:2px solid #1976d2;outline-offset:-2px;z-index:1}.ngx-datex-nav-button:focus{outline:2px solid #1976d2;outline-offset:2px}.ngx-datex-range-item:focus{outline:2px solid #1976d2;outline-offset:-2px}.ngx-datex-overlay{animation:fadeInScale .2s ease-out}.ngx-datex-overlay:before,.ngx-datex-overlay:after{animation:fadeInArrow .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-up:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-down:after{animation:fadeInArrowCenterHorizontal .2s ease-out .1s both}.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-left:after,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:before,.ngx-datex-overlay.ngx-datex-arrow-align-center.ngx-datex-arrow-right:after{animation:fadeInArrowCenterVertical .2s ease-out .1s both}@keyframes fadeInScale{0%{opacity:0;transform:scale(.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes fadeInArrow{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes fadeInArrowCenterHorizontal{0%{opacity:0;transform:translate(-50%) scale(.8)}to{opacity:1;transform:translate(-50%) scale(1)}}@keyframes fadeInArrowCenterVertical{0%{opacity:0;transform:translateY(-50%) scale(.8)}to{opacity:1;transform:translateY(-50%) scale(1)}}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-right{display:none}.ngx-datex-overlay.ngx-datex-single .ngx-datex-calendar.ngx-datex-calendar-left{padding:8px}.ngx-datex-time-picker{border-top:1px solid #e0e0e0;padding:8px;background:#fff;margin-top:8px}.ngx-datex-time-controls{display:flex;justify-content:center;align-items:center;gap:4px;flex-wrap:nowrap}.ngx-datex-time-separator{font-size:14px;font-weight:700;color:#333;margin:0 2px;line-height:1}.ngx-datex-time-select{border:1px solid #ccc;border-radius:3px;padding:2px 4px;font-size:11px;background:#fff;color:#333;outline:none;cursor:pointer;appearance:auto;-webkit-appearance:menulist;-moz-appearance:menulist;min-height:22px;line-height:1}.ngx-datex-time-select:focus{border-color:#1976d2;box-shadow:0 0 0 1px #1976d233}.ngx-datex-time-select:disabled{background:#f5f5f5;color:#999;cursor:not-allowed;opacity:.6}.ngx-datex-time-select option{padding:2px 4px;font-size:11px}.ngx-datex-hour-select,.ngx-datex-minute-select{width:50px;text-align:center}.ngx-datex-ampm-select{width:45px;text-align:center}.ngx-datex-mobile .ngx-datex-time-picker{margin-top:12px;padding:12px}.ngx-datex-mobile .ngx-datex-time-controls{gap:6px}.ngx-datex-mobile .ngx-datex-time-separator{font-size:16px;margin:0 4px}.ngx-datex-mobile .ngx-datex-time-select{font-size:14px;padding:4px 6px;min-height:32px;border-radius:4px}.ngx-datex-mobile .ngx-datex-hour-select,.ngx-datex-mobile .ngx-datex-minute-select{width:60px}.ngx-datex-mobile .ngx-datex-ampm-select{width:55px}@media(min-width:564px)and (max-width:768px){.ngx-datex-overlay.ngx-datex-overlay-mobile{position:fixed;width:90%;max-width:500px;inset:auto auto 20px 50%;transform:translate(-50%);border-radius:8px}}@media(min-width:564px){.ngx-datex-mobile .ngx-datex-overlay{position:absolute;inset:100% auto auto 0;width:650px;max-width:90vw;border-radius:8px;margin-top:7px;max-height:none}.ngx-datex-mobile .ngx-datex-overlay:before,.ngx-datex-mobile .ngx-datex-overlay:after{display:inline-block}.ngx-datex-mobile .ngx-datex-footer{display:flex}.ngx-datex-mobile .ngx-datex-mobile-header{display:none}.ngx-datex-mobile .ngx-datex-ranges-sidebar{width:140px;flex-direction:column;border-right:1px solid #e0e0e0;border-bottom:none;border-radius:8px 0 0 8px;overflow-x:visible;padding:0}.ngx-datex-mobile .ngx-datex-range-item{white-space:normal;padding:8px 12px;margin:2px 0;border-radius:0;background:none;border:none;text-align:left;min-width:auto}.ngx-datex-mobile .ngx-datex-calendars{flex-direction:row;padding:0}.ngx-datex-mobile .ngx-datex-calendar{padding:8px 0 8px 8px}.ngx-datex-mobile .ngx-datex-calendar.ngx-datex-calendar-right{padding:8px 8px 8px 0}.ngx-datex-mobile .ngx-datex-days-header{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-days-header-row{display:table-row}.ngx-datex-mobile .ngx-datex-calendar-grid{display:table;width:100%;border-collapse:collapse;border-spacing:0}.ngx-datex-mobile .ngx-datex-week{display:table-row}.ngx-datex-mobile .ngx-datex-week-number-header,.ngx-datex-mobile .ngx-datex-week-number{display:none}.ngx-datex-mobile .ngx-datex-day-header{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;box-sizing:border-box;text-align:center;vertical-align:middle}.ngx-datex-mobile .ngx-datex-day{display:table-cell;width:14.28%;height:28px;line-height:28px;font-size:12px;border-radius:4px;box-sizing:border-box;text-align:center;vertical-align:middle}}.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-selected,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-active,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-in-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-range-end,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-range,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-start,.ngx-datex-day.ngx-datex-day-other-month.ngx-datex-day-hover-end{background-color:#fff!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;border-radius:4px!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:hover,.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}.ngx-datex-day.ngx-datex-day-other-month:focus{background-color:#eee!important;border:1px solid transparent!important;border-color:transparent!important;color:#999!important;box-shadow:none!important;outline:none!important}\n"] }]
|
|
3544
4042
|
}], ctorParameters: () => [], propDecorators: { inputElement: [{
|
|
3545
4043
|
type: ViewChild,
|
|
3546
4044
|
args: ['inputElement']
|
|
3547
4045
|
}], calendarTemplate: [{
|
|
3548
4046
|
type: ViewChild,
|
|
3549
4047
|
args: ['calendarTemplate']
|
|
3550
|
-
}], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], calendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIcon", required: false }] }], showCalendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarIcon", required: false }] }], calendarIconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIconPosition", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], checkboxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxPosition", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], singleDatePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleDatePicker", required: false }] }], autoApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoApply", required: false }] }], showDropdowns: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDropdowns", required: false }] }], timePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker", required: false }] }], timePicker24Hour: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker24Hour", required: false }] }], timePickerIncrement: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerIncrement", required: false }] }], timePickerSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerSeconds", required: false }] }], linkedCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkedCalendars", required: false }] }], autoUpdateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoUpdateInput", required: false }] }], alwaysShowCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysShowCalendars", required: false }] }], showCustomRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomRangeLabel", required: false }] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], maxSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSpan", required: false }] }], showWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeekNumbers", required: false }] }], showISOWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showISOWeekNumbers", required: false }] }], buttonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonClasses", required: false }] }], applyButtonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonClasses", required: false }] }], cancelButtonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonClasses", required: false }] }], isInvalidDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInvalidDate", required: false }] }], isCustomDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCustomDate", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], ranges: [{ type: i0.Input, args: [{ isSignal: true, alias: "ranges", required: false }] }], opens: [{ type: i0.Input, args: [{ isSignal: true, alias: "opens", required: false }] }], drops: [{ type: i0.Input, args: [{ isSignal: true, alias: "drops", required: false }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], footerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerTemplate", required: false }] }], dayTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayTemplate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }], openEvent: [{ type: i0.Output, args: ["openEvent"] }], closeEvent: [{ type: i0.Output, args: ["closeEvent"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], yearChange: [{ type: i0.Output, args: ["yearChange"] }], dateHover: [{ type: i0.Output, args: ["dateHover"] }], validationError: [{ type: i0.Output, args: ["validationError"] }], checkboxChange: [{ type: i0.Output, args: ["checkboxChange"] }] } });
|
|
4048
|
+
}], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], calendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIcon", required: false }] }], showCalendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarIcon", required: false }] }], calendarIconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIconPosition", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], checkboxChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxChecked", required: false }] }], checkboxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxPosition", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], singleDatePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleDatePicker", required: false }] }], autoApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoApply", required: false }] }], showDropdowns: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDropdowns", required: false }] }], timePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker", required: false }] }], timePicker24Hour: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker24Hour", required: false }] }], timePickerIncrement: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerIncrement", required: false }] }], timePickerSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerSeconds", required: false }] }], linkedCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkedCalendars", required: false }] }], autoUpdateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoUpdateInput", required: false }] }], alwaysShowCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysShowCalendars", required: false }] }], showCustomRangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomRangeLabel", required: false }] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], maxSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSpan", required: false }] }], showWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeekNumbers", required: false }] }], showISOWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showISOWeekNumbers", required: false }] }], buttonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonClasses", required: false }] }], applyButtonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonClasses", required: false }] }], cancelButtonClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonClasses", required: false }] }], isInvalidDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInvalidDate", required: false }] }], isCustomDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCustomDate", required: false }] }], minYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "minYear", required: false }] }], maxYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxYear", required: false }] }], ranges: [{ type: i0.Input, args: [{ isSignal: true, alias: "ranges", required: false }] }], opens: [{ type: i0.Input, args: [{ isSignal: true, alias: "opens", required: false }] }], drops: [{ type: i0.Input, args: [{ isSignal: true, alias: "drops", required: false }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTemplate", required: false }] }], footerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerTemplate", required: false }] }], dayTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayTemplate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }], openEvent: [{ type: i0.Output, args: ["openEvent"] }], closeEvent: [{ type: i0.Output, args: ["closeEvent"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], yearChange: [{ type: i0.Output, args: ["yearChange"] }], dateHover: [{ type: i0.Output, args: ["dateHover"] }], validationError: [{ type: i0.Output, args: ["validationError"] }], checkboxChange: [{ type: i0.Output, args: ["checkboxChange"] }] } });
|
|
3551
4049
|
|
|
3552
4050
|
/*
|
|
3553
4051
|
* Public API Surface of ngx-datex
|
|
@@ -3558,5 +4056,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3558
4056
|
* Generated bundle index. Do not edit.
|
|
3559
4057
|
*/
|
|
3560
4058
|
|
|
3561
|
-
export { DEFAULT_RANGES, MATERIAL_LIGHT_THEME, NgxDatex, NgxDatexCalendarService, NgxDatexOverlayService, NgxDatexService, NgxDatexTimePickerService, SPANISH_LOCALE, addDays, addMonths, endOfDay, formatDateValue, getStartOfMonth, getStartOfWeek, isBeforeDate, isMobileDevice, isSameDate, isSameDay, isSameMonth, isSameYear, isValidDate, parseDateValue, startOfDay, startOfMonth, startOfWeek };
|
|
4059
|
+
export { DEFAULT_RANGES, ISO_LOCALE, ISO_LOCALE_WITH_TIME, MATERIAL_LIGHT_THEME, NgxDatex, NgxDatexCalendarService, NgxDatexOverlayService, NgxDatexService, NgxDatexTimePickerService, SPANISH_LOCALE, SPANISH_LOCALE_WITH_TIME, SPANISH_LOCALE_WITH_TIME_12H, US_ENGLISH_LOCALE, US_ENGLISH_LOCALE_WITH_TIME, addDays, addMonths, endOfDay, formatDateValue, getStartOfMonth, getStartOfWeek, isBeforeDate, isMobileDevice, isSameDate, isSameDay, isSameMonth, isSameYear, isValidDate, parseDateValue, startOfDay, startOfMonth, startOfWeek };
|
|
3562
4060
|
//# sourceMappingURL=ngx-datex.mjs.map
|