@exhaustive-ui/core 22.0.0-alpha.9 → 22.0.0-rc.1
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/exhaustive-ui-core-accordion.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +3 -3
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +25 -14
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatargroup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-avatargroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs +34 -4
- package/fesm2022/exhaustive-ui-core-basecomponent.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-baseeditableholder.mjs +4 -2
- package/fesm2022/exhaustive-ui-core-baseeditableholder.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +9 -2
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +13 -6
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +35 -13
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-card.mjs +2 -6
- package/fesm2022/exhaustive-ui-core-card.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +9 -4
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +12 -11
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-config.mjs +3 -1
- package/fesm2022/exhaustive-ui-core-config.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +65 -26
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +28 -5
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +15 -8
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +188 -95
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +31 -13
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-divider.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-divider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dom.mjs +3 -1
- package/fesm2022/exhaustive-ui-core-dom.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +24 -6
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +9 -5
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +25 -14
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +0 -2
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +18 -3
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +12 -4
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +3 -3
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +11 -2
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +31 -7
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +85 -25
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +9 -3
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +8 -9
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +27 -17
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +17 -6
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +4 -3
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +15 -4
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +58 -14
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-message.mjs +2 -4
- package/fesm2022/exhaustive-ui-core-message.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +7 -7
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +38 -27
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +19 -6
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlay.mjs +6 -4
- package/fesm2022/exhaustive-ui-core-overlay.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +4 -4
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +12 -5
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +9 -11
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +43 -15
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +93 -25
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +33 -12
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +27 -8
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-progressbar.mjs +5 -5
- package/fesm2022/exhaustive-ui-core-progressbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-progressspinner.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-progressspinner.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-radiobutton.mjs +8 -3
- package/fesm2022/exhaustive-ui-core-radiobutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +14 -4
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +11 -3
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +102 -29
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +13 -7
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-skeleton.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +18 -5
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +9 -5
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +29 -8
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-stepper.mjs +8 -4
- package/fesm2022/exhaustive-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +535 -203
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tabs.mjs +44 -8
- package/fesm2022/exhaustive-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tag.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-tag.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +9 -4
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +31 -16
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toast.mjs +17 -5
- package/fesm2022/exhaustive-ui-core-toast.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +11 -4
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +2 -4
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +5 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +30 -11
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +53 -6
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +93 -21
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-usestyle.mjs +49 -0
- package/fesm2022/exhaustive-ui-core-usestyle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-utils.mjs +2 -1
- package/fesm2022/exhaustive-ui-core-utils.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/migrate-from-primeflex/index.js +4 -2
- package/schematics/migrate-from-primeflex/schema.json +5 -0
- package/schematics/utils/package-json.js +17 -0
- package/schematics/utils/primeflex.js +45 -10
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-api.d.ts +6 -0
- package/types/exhaustive-ui-core-autocomplete.d.ts +2 -0
- package/types/exhaustive-ui-core-basecomponent.d.ts +16 -0
- package/types/exhaustive-ui-core-breadcrumb.d.ts +7 -1
- package/types/exhaustive-ui-core-button.d.ts +12 -1
- package/types/exhaustive-ui-core-cascadeselect.d.ts +2 -1
- package/types/exhaustive-ui-core-chart.d.ts +2 -2
- package/types/exhaustive-ui-core-confirmdialog.d.ts +17 -5
- package/types/exhaustive-ui-core-confirmpopup.d.ts +4 -0
- package/types/exhaustive-ui-core-datepicker.d.ts +10 -2
- package/types/exhaustive-ui-core-dialog.d.ts +2 -0
- package/types/exhaustive-ui-core-drawer.d.ts +1 -0
- package/types/exhaustive-ui-core-fileupload.d.ts +4 -0
- package/types/exhaustive-ui-core-iconfield.d.ts +1 -2
- package/types/exhaustive-ui-core-image.d.ts +6 -1
- package/types/exhaustive-ui-core-inputnumber.d.ts +8 -0
- package/types/exhaustive-ui-core-keyfilter.d.ts +1 -0
- package/types/exhaustive-ui-core-megamenu.d.ts +1 -0
- package/types/exhaustive-ui-core-menu.d.ts +2 -0
- package/types/exhaustive-ui-core-menubar.d.ts +5 -0
- package/types/exhaustive-ui-core-metergroup.d.ts +1 -1
- package/types/exhaustive-ui-core-multiselect.d.ts +1 -1
- package/types/exhaustive-ui-core-orderlist.d.ts +11 -1
- package/types/exhaustive-ui-core-paginator.d.ts +1 -0
- package/types/exhaustive-ui-core-panelmenu.d.ts +7 -0
- package/types/exhaustive-ui-core-password.d.ts +9 -1
- package/types/exhaustive-ui-core-picklist.d.ts +8 -3
- package/types/exhaustive-ui-core-popover.d.ts +3 -0
- package/types/exhaustive-ui-core-select.d.ts +13 -1
- package/types/exhaustive-ui-core-selectbutton.d.ts +3 -0
- package/types/exhaustive-ui-core-splitbutton.d.ts +2 -1
- package/types/exhaustive-ui-core-splitter.d.ts +7 -1
- package/types/exhaustive-ui-core-stepper.d.ts +3 -2
- package/types/exhaustive-ui-core-table.d.ts +34 -4
- package/types/exhaustive-ui-core-tabs.d.ts +4 -0
- package/types/exhaustive-ui-core-tieredmenu.d.ts +2 -0
- package/types/exhaustive-ui-core-togglebutton.d.ts +1 -0
- package/types/exhaustive-ui-core-tree.d.ts +2 -0
- package/types/exhaustive-ui-core-treeselect.d.ts +12 -1
- package/types/exhaustive-ui-core-treetable.d.ts +22 -2
- package/types/exhaustive-ui-core-types-chart.d.ts +21 -1
- package/types/exhaustive-ui-core-types-confirmdialog.d.ts +1 -3
- package/types/exhaustive-ui-core-types-table.d.ts +1 -1
- package/types/exhaustive-ui-core-types-treetable.d.ts +2 -2
- package/types/exhaustive-ui-core-usestyle.d.ts +17 -0
|
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/datepicker';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, forwardRef, InjectionToken, inject, NgZone, input, booleanAttribute, numberAttribute, computed, output, viewChild, signal, contentChild, linkedSignal, effect, untracked, afterNextRender,
|
|
5
|
+
import { Injectable, forwardRef, InjectionToken, inject, NgZone, input, booleanAttribute, numberAttribute, computed, output, viewChild, signal, contentChild, linkedSignal, effect, untracked, afterNextRender, contentChildren, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { uuid, getOuterWidth, isDate, findSingle, getFocusableElements, hasClass, getIndex, find, isNotEmpty, addStyle, appendChild, absolutePosition, relativePosition, addClass, setAttribute, isTouchDevice } from '@exhaustive-ui/utils';
|
|
8
8
|
import { OverlayService, PrimeTemplate, TranslationKeys, SharedModule } from '@exhaustive-ui/core/api';
|
|
@@ -29,6 +29,10 @@ ${style$1}
|
|
|
29
29
|
.p-datepicker.ng-invalid.ng-dirty .p-inputtext {
|
|
30
30
|
border-color: dt('inputtext.invalid.border.color');
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
.p-datepicker.ng-invalid.ng-dirty .p-inputtext::placeholder {
|
|
34
|
+
color: dt('inputtext.invalid.placeholder.color');
|
|
35
|
+
}
|
|
32
36
|
`;
|
|
33
37
|
const inlineStyles = {
|
|
34
38
|
root: () => ({ position: 'relative' })
|
|
@@ -359,6 +363,12 @@ class DatePicker extends BaseInput {
|
|
|
359
363
|
*/
|
|
360
364
|
ariaLabel = input(/* @ts-ignore */
|
|
361
365
|
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
366
|
+
/**
|
|
367
|
+
* Establishes relationships between the input and the element(s) that describe it, as one or more element IDs.
|
|
368
|
+
* @group Props
|
|
369
|
+
*/
|
|
370
|
+
ariaDescribedBy = input(/* @ts-ignore */
|
|
371
|
+
...(ngDevMode ? [undefined, { debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
362
372
|
/**
|
|
363
373
|
* Defines a string that labels the icon button for accessibility.
|
|
364
374
|
* @group Props
|
|
@@ -424,8 +434,7 @@ class DatePicker extends BaseInput {
|
|
|
424
434
|
* Specifies 12 or 24 hour format.
|
|
425
435
|
* @group Props
|
|
426
436
|
*/
|
|
427
|
-
hourFormat = input('24', /*
|
|
428
|
-
...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
|
|
437
|
+
hourFormat = input('24', { ...(ngDevMode ? { debugName: "hourFormat" } : /* istanbul ignore next */ {}), transform: (value) => String(value) });
|
|
429
438
|
/**
|
|
430
439
|
* Whether to display timepicker only.
|
|
431
440
|
* @group Props
|
|
@@ -737,6 +746,18 @@ class DatePicker extends BaseInput {
|
|
|
737
746
|
...(ngDevMode ? [{ debugName: "currentSecond" }] : /* istanbul ignore next */ []));
|
|
738
747
|
pm = signal(undefined, /* @ts-ignore */
|
|
739
748
|
...(ngDevMode ? [{ debugName: "pm" }] : /* istanbul ignore next */ []));
|
|
749
|
+
// Text of the time picker live region, so screen readers announce the time when it changes.
|
|
750
|
+
timeAnnouncement = computed(() => {
|
|
751
|
+
const pad = (value) => (value == null ? '' : `${value < 10 ? '0' : ''}${value}`);
|
|
752
|
+
const separator = this.timeSeparator();
|
|
753
|
+
let time = pad(this.currentHour()) + separator + pad(this.currentMinute());
|
|
754
|
+
if (this.showSeconds())
|
|
755
|
+
time += separator + pad(this.currentSecond());
|
|
756
|
+
if (this.hourFormat() == '12')
|
|
757
|
+
time += ' ' + this.getTranslation(this.pm() ? 'pm' : 'am');
|
|
758
|
+
return time;
|
|
759
|
+
}, /* @ts-ignore */
|
|
760
|
+
...(ngDevMode ? [{ debugName: "timeAnnouncement" }] : /* istanbul ignore next */ []));
|
|
740
761
|
mask = signal(undefined, /* @ts-ignore */
|
|
741
762
|
...(ngDevMode ? [{ debugName: "mask" }] : /* istanbul ignore next */ []));
|
|
742
763
|
maskClickListener = signal(undefined, /* @ts-ignore */
|
|
@@ -1022,7 +1043,7 @@ class DatePicker extends BaseInput {
|
|
|
1022
1043
|
}
|
|
1023
1044
|
}
|
|
1024
1045
|
});
|
|
1025
|
-
|
|
1046
|
+
this.bindHostAttrs(this.bindDirectiveInstance, () => this.ptms(['host', 'root']));
|
|
1026
1047
|
}
|
|
1027
1048
|
onInit() {
|
|
1028
1049
|
const date = this.defaultDate() || new Date();
|
|
@@ -1030,14 +1051,13 @@ class DatePicker extends BaseInput {
|
|
|
1030
1051
|
this.currentMonth.set(date.getMonth());
|
|
1031
1052
|
this.currentYear.set(date.getFullYear());
|
|
1032
1053
|
this.yearOptions.set([]);
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
this.ticksTo1970.set(((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);
|
|
1038
|
-
}
|
|
1054
|
+
this.createWeekDays();
|
|
1055
|
+
this.initTime(date);
|
|
1056
|
+
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1057
|
+
this.ticksTo1970.set(((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);
|
|
1039
1058
|
this.translationSubscription.set(this.config.translationObserver.subscribe(() => {
|
|
1040
1059
|
this.createWeekDays();
|
|
1060
|
+
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1041
1061
|
this.cd.markForCheck();
|
|
1042
1062
|
}));
|
|
1043
1063
|
}
|
|
@@ -1167,7 +1187,9 @@ class DatePicker extends BaseInput {
|
|
|
1167
1187
|
}
|
|
1168
1188
|
}
|
|
1169
1189
|
if (this.showWeek()) {
|
|
1170
|
-
|
|
1190
|
+
// an ISO week is the one of its Thursday, so number the row by the Thursday it contains
|
|
1191
|
+
let weekDay = this.startWeekFromFirstDayOfYear() ? week[0] : week[(11 - +this.getFirstDateOfWeek()) % 7];
|
|
1192
|
+
weekNumbers.push(this.getWeekNumber(new Date(weekDay.year, weekDay.month, weekDay.day)));
|
|
1171
1193
|
}
|
|
1172
1194
|
dates.push(week);
|
|
1173
1195
|
}
|
|
@@ -1219,6 +1241,7 @@ class DatePicker extends BaseInput {
|
|
|
1219
1241
|
}
|
|
1220
1242
|
this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
|
|
1221
1243
|
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1244
|
+
this.realignOverlay();
|
|
1222
1245
|
}
|
|
1223
1246
|
}
|
|
1224
1247
|
navForward(event) {
|
|
@@ -1249,6 +1272,7 @@ class DatePicker extends BaseInput {
|
|
|
1249
1272
|
}
|
|
1250
1273
|
this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
|
|
1251
1274
|
this.createMonths(this.currentMonth(), this.currentYear());
|
|
1275
|
+
this.realignOverlay();
|
|
1252
1276
|
}
|
|
1253
1277
|
}
|
|
1254
1278
|
decrementYear() {
|
|
@@ -1398,7 +1422,7 @@ class DatePicker extends BaseInput {
|
|
|
1398
1422
|
return new Date(dateMeta.year, dateMeta.month, dateMeta.day);
|
|
1399
1423
|
}
|
|
1400
1424
|
formatDateKey(date) {
|
|
1401
|
-
return `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
|
|
1425
|
+
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
1402
1426
|
}
|
|
1403
1427
|
setCurrentHourPM(hours) {
|
|
1404
1428
|
if (this.hourFormat() == '12') {
|
|
@@ -1490,6 +1514,10 @@ class DatePicker extends BaseInput {
|
|
|
1490
1514
|
this.onModelChange(stringArrValue);
|
|
1491
1515
|
}
|
|
1492
1516
|
}
|
|
1517
|
+
if (this.inline()) {
|
|
1518
|
+
// An inline datepicker has no input to blur, so a user change is what marks it touched
|
|
1519
|
+
this.onModelTouched();
|
|
1520
|
+
}
|
|
1493
1521
|
}
|
|
1494
1522
|
getFirstDayOfMonthIndex(month, year) {
|
|
1495
1523
|
let day = new Date();
|
|
@@ -1601,8 +1629,12 @@ class DatePicker extends BaseInput {
|
|
|
1601
1629
|
}
|
|
1602
1630
|
isYearSelected(year) {
|
|
1603
1631
|
if (this.isComparable()) {
|
|
1632
|
+
if (this.isRangeSelection() && this.value()[1]) {
|
|
1633
|
+
// like isMonthSelected, a complete range highlights every year it spans
|
|
1634
|
+
return this.value()[0]?.getFullYear() <= year && year <= this.value()[1].getFullYear();
|
|
1635
|
+
}
|
|
1604
1636
|
let value = this.isRangeSelection() ? this.value()[0] : this.value();
|
|
1605
|
-
return !this.isMultipleSelection() ? value
|
|
1637
|
+
return !this.isMultipleSelection() ? value?.getFullYear() === year : false;
|
|
1606
1638
|
}
|
|
1607
1639
|
return false;
|
|
1608
1640
|
}
|
|
@@ -1874,9 +1906,13 @@ class DatePicker extends BaseInput {
|
|
|
1874
1906
|
case 37: {
|
|
1875
1907
|
cellContent.tabIndex = '-1';
|
|
1876
1908
|
let prevCell = cell.previousElementSibling;
|
|
1909
|
+
if (!prevCell || hasClass(prevCell, 'p-datepicker-weeknumber')) {
|
|
1910
|
+
// first day of the week row: the previous day ends the previous row
|
|
1911
|
+
prevCell = cell.parentElement.previousElementSibling?.lastElementChild;
|
|
1912
|
+
}
|
|
1877
1913
|
if (prevCell) {
|
|
1878
1914
|
let focusCell = prevCell.children[0];
|
|
1879
|
-
if (hasClass(focusCell, 'p-disabled') || hasClass(focusCell.parentElement, 'p-datepicker-weeknumber')) {
|
|
1915
|
+
if (!focusCell || hasClass(focusCell, 'p-disabled') || hasClass(focusCell.parentElement, 'p-datepicker-weeknumber')) {
|
|
1880
1916
|
this.navigateToMonth(true, groupIndex);
|
|
1881
1917
|
}
|
|
1882
1918
|
else {
|
|
@@ -1894,9 +1930,14 @@ class DatePicker extends BaseInput {
|
|
|
1894
1930
|
case 39: {
|
|
1895
1931
|
cellContent.tabIndex = '-1';
|
|
1896
1932
|
let nextCell = cell.nextElementSibling;
|
|
1933
|
+
if (!nextCell) {
|
|
1934
|
+
// last day of the week row: the next day starts the next row
|
|
1935
|
+
const nextRow = cell.parentElement.nextElementSibling;
|
|
1936
|
+
nextCell = nextRow && Array.from(nextRow.children).find((rowCell) => !hasClass(rowCell, 'p-datepicker-weeknumber'));
|
|
1937
|
+
}
|
|
1897
1938
|
if (nextCell) {
|
|
1898
1939
|
let focusCell = nextCell.children[0];
|
|
1899
|
-
if (hasClass(focusCell, 'p-disabled')) {
|
|
1940
|
+
if (!focusCell || hasClass(focusCell, 'p-disabled')) {
|
|
1900
1941
|
this.navigateToMonth(false, groupIndex);
|
|
1901
1942
|
}
|
|
1902
1943
|
else {
|
|
@@ -1932,48 +1973,47 @@ class DatePicker extends BaseInput {
|
|
|
1932
1973
|
}
|
|
1933
1974
|
break;
|
|
1934
1975
|
}
|
|
1935
|
-
// page up
|
|
1976
|
+
// page up (shift: previous year)
|
|
1936
1977
|
case 33: {
|
|
1937
1978
|
cellContent.tabIndex = '-1';
|
|
1938
|
-
const dateToFocus = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, currentDate.getDate());
|
|
1939
|
-
const focusKey = this.formatDateKey(dateToFocus)
|
|
1940
|
-
|
|
1979
|
+
const dateToFocus = event.shiftKey ? new Date(currentDate.getFullYear() - 1, currentDate.getMonth(), currentDate.getDate()) : new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, currentDate.getDate());
|
|
1980
|
+
const focusKey = `span[data-date='${this.formatDateKey(dateToFocus)}']:not(.p-disabled):not(.p-ink)`;
|
|
1981
|
+
if (event.shiftKey)
|
|
1982
|
+
this.navigateToYear(true, focusKey);
|
|
1983
|
+
else
|
|
1984
|
+
this.navigateToMonth(true, groupIndex, focusKey);
|
|
1941
1985
|
event.preventDefault();
|
|
1942
1986
|
break;
|
|
1943
1987
|
}
|
|
1944
|
-
// page down
|
|
1988
|
+
// page down (shift: next year)
|
|
1945
1989
|
case 34: {
|
|
1946
1990
|
cellContent.tabIndex = '-1';
|
|
1947
|
-
const dateToFocus = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, currentDate.getDate());
|
|
1948
|
-
const focusKey = this.formatDateKey(dateToFocus)
|
|
1949
|
-
|
|
1991
|
+
const dateToFocus = event.shiftKey ? new Date(currentDate.getFullYear() + 1, currentDate.getMonth(), currentDate.getDate()) : new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, currentDate.getDate());
|
|
1992
|
+
const focusKey = `span[data-date='${this.formatDateKey(dateToFocus)}']:not(.p-disabled):not(.p-ink)`;
|
|
1993
|
+
if (event.shiftKey)
|
|
1994
|
+
this.navigateToYear(false, focusKey);
|
|
1995
|
+
else
|
|
1996
|
+
this.navigateToMonth(false, groupIndex, focusKey);
|
|
1950
1997
|
event.preventDefault();
|
|
1951
1998
|
break;
|
|
1952
1999
|
}
|
|
1953
|
-
//home
|
|
2000
|
+
//home: first day of the week row
|
|
2001
|
+
//end: last day of the week row
|
|
1954
2002
|
case 36:
|
|
1955
|
-
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
//end
|
|
1966
|
-
case 35:
|
|
1967
|
-
cellContent.tabIndex = '-1';
|
|
1968
|
-
const lastDayDate = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);
|
|
1969
|
-
const lastDayDateKey = this.formatDateKey(lastDayDate);
|
|
1970
|
-
const lastDayCell = findSingle(cellContent.offsetParent, `span[data-date='${lastDayDateKey}']:not(.p-disabled):not(.p-ink)`);
|
|
1971
|
-
if (lastDayDate) {
|
|
1972
|
-
lastDayCell.tabIndex = '0';
|
|
1973
|
-
lastDayCell.focus();
|
|
2003
|
+
case 35: {
|
|
2004
|
+
const weekDayCells = Array.from(cell.parentElement.children)
|
|
2005
|
+
.filter((rowCell) => !hasClass(rowCell, 'p-datepicker-weeknumber'))
|
|
2006
|
+
.map((rowCell) => rowCell.children[0])
|
|
2007
|
+
.filter((dayCell) => dayCell && !hasClass(dayCell, 'p-disabled'));
|
|
2008
|
+
const focusCell = event.which === 36 ? weekDayCells[0] : weekDayCells[weekDayCells.length - 1];
|
|
2009
|
+
if (focusCell) {
|
|
2010
|
+
cellContent.tabIndex = '-1';
|
|
2011
|
+
focusCell.tabIndex = '0';
|
|
2012
|
+
focusCell.focus();
|
|
1974
2013
|
}
|
|
1975
2014
|
event.preventDefault();
|
|
1976
2015
|
break;
|
|
2016
|
+
}
|
|
1977
2017
|
default:
|
|
1978
2018
|
//no op
|
|
1979
2019
|
break;
|
|
@@ -2034,6 +2074,19 @@ class DatePicker extends BaseInput {
|
|
|
2034
2074
|
event.preventDefault();
|
|
2035
2075
|
break;
|
|
2036
2076
|
}
|
|
2077
|
+
//page up: previous year
|
|
2078
|
+
//page down: next year
|
|
2079
|
+
case 33:
|
|
2080
|
+
case 34: {
|
|
2081
|
+
cell.tabIndex = '-1';
|
|
2082
|
+
this.navigationState.set({ backward: event.which === 33 });
|
|
2083
|
+
if (event.which === 33)
|
|
2084
|
+
this.navBackward(event);
|
|
2085
|
+
else
|
|
2086
|
+
this.navForward(event);
|
|
2087
|
+
event.preventDefault();
|
|
2088
|
+
break;
|
|
2089
|
+
}
|
|
2037
2090
|
//escape
|
|
2038
2091
|
case 27: {
|
|
2039
2092
|
this.inputfieldViewChild()?.nativeElement.focus();
|
|
@@ -2108,6 +2161,19 @@ class DatePicker extends BaseInput {
|
|
|
2108
2161
|
event.preventDefault();
|
|
2109
2162
|
break;
|
|
2110
2163
|
}
|
|
2164
|
+
//page up: previous decade
|
|
2165
|
+
//page down: next decade
|
|
2166
|
+
case 33:
|
|
2167
|
+
case 34: {
|
|
2168
|
+
cell.tabIndex = '-1';
|
|
2169
|
+
this.navigationState.set({ backward: event.which === 33 });
|
|
2170
|
+
if (event.which === 33)
|
|
2171
|
+
this.navBackward(event);
|
|
2172
|
+
else
|
|
2173
|
+
this.navForward(event);
|
|
2174
|
+
event.preventDefault();
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2111
2177
|
//escape
|
|
2112
2178
|
case 27: {
|
|
2113
2179
|
this.inputfieldViewChild()?.nativeElement.focus();
|
|
@@ -2168,6 +2234,17 @@ class DatePicker extends BaseInput {
|
|
|
2168
2234
|
}
|
|
2169
2235
|
}
|
|
2170
2236
|
}
|
|
2237
|
+
navigateToYear(prev, focusKey) {
|
|
2238
|
+
this.navigationState.set({ backward: prev });
|
|
2239
|
+
this._focusKey.set(focusKey);
|
|
2240
|
+
this.isMonthNavigate.set(true);
|
|
2241
|
+
if (prev)
|
|
2242
|
+
this.decrementYear();
|
|
2243
|
+
else
|
|
2244
|
+
this.incrementYear();
|
|
2245
|
+
this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
|
|
2246
|
+
this.createMonths(this.currentMonth(), this.currentYear());
|
|
2247
|
+
}
|
|
2171
2248
|
updateFocus() {
|
|
2172
2249
|
let cell;
|
|
2173
2250
|
if (this.navigationState()) {
|
|
@@ -2342,7 +2419,8 @@ class DatePicker extends BaseInput {
|
|
|
2342
2419
|
value = this.value()[this.value().length - 1];
|
|
2343
2420
|
}
|
|
2344
2421
|
}
|
|
2345
|
-
|
|
2422
|
+
// without a value, updateTime builds the new value on today's date
|
|
2423
|
+
const valueDateString = (value && isDate(value) ? value : new Date()).toDateString();
|
|
2346
2424
|
let isMinDate = this.minDate() && valueDateString && this.minDate().toDateString() === valueDateString;
|
|
2347
2425
|
let isMaxDate = this.maxDate() && valueDateString && this.maxDate().toDateString() === valueDateString;
|
|
2348
2426
|
if (isMinDate) {
|
|
@@ -2350,21 +2428,6 @@ class DatePicker extends BaseInput {
|
|
|
2350
2428
|
}
|
|
2351
2429
|
switch (true // intentional fall through
|
|
2352
2430
|
) {
|
|
2353
|
-
case isMinDate && minHoursExceeds12 && this.minDate().getHours() === 12 && this.minDate().getHours() > convertedHour:
|
|
2354
|
-
returnTimeTriple[0] = 11;
|
|
2355
|
-
case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() > minute:
|
|
2356
|
-
returnTimeTriple[1] = this.minDate().getMinutes();
|
|
2357
|
-
case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() === minute && this.minDate().getSeconds() > second:
|
|
2358
|
-
returnTimeTriple[2] = this.minDate().getSeconds();
|
|
2359
|
-
break;
|
|
2360
|
-
case isMinDate && !minHoursExceeds12 && this.minDate().getHours() - 1 === convertedHour && this.minDate().getHours() > convertedHour:
|
|
2361
|
-
returnTimeTriple[0] = 11;
|
|
2362
|
-
this.pm.set(true);
|
|
2363
|
-
case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() > minute:
|
|
2364
|
-
returnTimeTriple[1] = this.minDate().getMinutes();
|
|
2365
|
-
case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() === minute && this.minDate().getSeconds() > second:
|
|
2366
|
-
returnTimeTriple[2] = this.minDate().getSeconds();
|
|
2367
|
-
break;
|
|
2368
2431
|
case isMinDate && minHoursExceeds12 && this.minDate().getHours() > convertedHour && convertedHour !== 12:
|
|
2369
2432
|
this.setCurrentHourPM(this.minDate().getHours());
|
|
2370
2433
|
returnTimeTriple[0] = this.currentHour() || 0;
|
|
@@ -2536,7 +2599,9 @@ class DatePicker extends BaseInput {
|
|
|
2536
2599
|
if (this.isMultipleSelection()) {
|
|
2537
2600
|
value = this.value()[this.value().length - 1];
|
|
2538
2601
|
}
|
|
2539
|
-
|
|
2602
|
+
// without a value, the time applies to the day the panel shows on opening: defaultDate when given, today otherwise
|
|
2603
|
+
const defaultDate = this.defaultDate();
|
|
2604
|
+
value = value && isDate(value) ? new Date(value.getTime()) : defaultDate && isDate(defaultDate) ? new Date(defaultDate.getTime()) : new Date();
|
|
2540
2605
|
if (this.hourFormat() == '12') {
|
|
2541
2606
|
if (this.currentHour() === 12)
|
|
2542
2607
|
value.setHours(this.pm() ? 12 : 0);
|
|
@@ -2572,17 +2637,18 @@ class DatePicker extends BaseInput {
|
|
|
2572
2637
|
event.preventDefault();
|
|
2573
2638
|
}
|
|
2574
2639
|
onUserInput(event) {
|
|
2575
|
-
//
|
|
2576
|
-
if (!this.isKeydown()) {
|
|
2577
|
-
return;
|
|
2578
|
-
}
|
|
2640
|
+
// The input event alone is handled: a paste or drop from the context menu fires no keydown before it
|
|
2579
2641
|
this.isKeydown.set(false);
|
|
2580
2642
|
let val = event.target.value;
|
|
2581
2643
|
try {
|
|
2582
2644
|
let value = this.parseValueFromString(val);
|
|
2583
2645
|
if (this.isValidSelection(value)) {
|
|
2646
|
+
// a typed minDate/maxDate day is selectable but parses at 00:00: keep it within the bounds, as selectDate does
|
|
2647
|
+
const constrain = (date) => (this.minDate() && this.minDate() > date ? new Date(this.minDate()) : this.maxDate() && this.maxDate() < date ? new Date(this.maxDate()) : date);
|
|
2648
|
+
value = Array.isArray(value) ? value.map((date) => date && constrain(date)) : constrain(value);
|
|
2584
2649
|
this.updateModel(value);
|
|
2585
2650
|
this.updateUI();
|
|
2651
|
+
this.realignOverlay();
|
|
2586
2652
|
}
|
|
2587
2653
|
else if (this.keepInvalid()) {
|
|
2588
2654
|
this.updateModel(value);
|
|
@@ -2744,6 +2810,13 @@ class DatePicker extends BaseInput {
|
|
|
2744
2810
|
this.el.nativeElement.appendChild(this.overlay());
|
|
2745
2811
|
}
|
|
2746
2812
|
}
|
|
2813
|
+
// a month can have 4 to 6 rows: a panel opened above the input has to move with its new height
|
|
2814
|
+
realignOverlay() {
|
|
2815
|
+
if (this.overlayVisible() && !this.inline()) {
|
|
2816
|
+
this.cd.detectChanges();
|
|
2817
|
+
this.alignOverlay();
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2747
2820
|
alignOverlay() {
|
|
2748
2821
|
if (this.touchUI()) {
|
|
2749
2822
|
this.enableModality(this.overlay());
|
|
@@ -3085,7 +3158,7 @@ class DatePicker extends BaseInput {
|
|
|
3085
3158
|
month = 1;
|
|
3086
3159
|
day = doy;
|
|
3087
3160
|
do {
|
|
3088
|
-
dim = this.getDaysCountInMonth(
|
|
3161
|
+
dim = this.getDaysCountInMonth(month - 1, year);
|
|
3089
3162
|
if (day <= dim) {
|
|
3090
3163
|
break;
|
|
3091
3164
|
}
|
|
@@ -3126,6 +3199,12 @@ class DatePicker extends BaseInput {
|
|
|
3126
3199
|
today: true,
|
|
3127
3200
|
selectable: true
|
|
3128
3201
|
};
|
|
3202
|
+
// selectDate applies the time picker values: set them to now, not to the time of the current value
|
|
3203
|
+
if (this.showTime() || this.timeOnly()) {
|
|
3204
|
+
this.setCurrentHourPM(date.getHours());
|
|
3205
|
+
this.currentMinute.set(date.getMinutes());
|
|
3206
|
+
this.currentSecond.set(this.showSeconds() ? date.getSeconds() : 0);
|
|
3207
|
+
}
|
|
3129
3208
|
this.createMonths(date.getMonth(), date.getFullYear());
|
|
3130
3209
|
this.onDateSelect(event, dateMeta);
|
|
3131
3210
|
this.onTodayClick.emit(date);
|
|
@@ -3226,7 +3305,9 @@ class DatePicker extends BaseInput {
|
|
|
3226
3305
|
}
|
|
3227
3306
|
}
|
|
3228
3307
|
isOutsideClicked(event) {
|
|
3229
|
-
|
|
3308
|
+
// inside a shadow root, event.target is retargeted to the shadow host: use the real target
|
|
3309
|
+
const target = event.composedPath?.()[0] ?? event.target;
|
|
3310
|
+
return !(this.el.nativeElement.isSameNode(target) || this.isNavIconClicked(event) || this.el.nativeElement.contains(target) || (this.overlay() && this.overlay().contains(target)));
|
|
3230
3311
|
}
|
|
3231
3312
|
isNavIconClicked(event) {
|
|
3232
3313
|
return hasClass(event.target, 'p-datepicker-prev-button') || hasClass(event.target, 'p-datepicker-prev-icon') || hasClass(event.target, 'p-datepicker-next-button') || hasClass(event.target, 'p-datepicker-next-icon');
|
|
@@ -3284,7 +3365,7 @@ class DatePicker extends BaseInput {
|
|
|
3284
3365
|
this.onOverlayHide();
|
|
3285
3366
|
}
|
|
3286
3367
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3287
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DatePicker, isStandalone: true, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: { iconDisplay: { classPropertyName: "iconDisplay", publicName: "iconDisplay", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, multipleSeparator: { classPropertyName: "multipleSeparator", publicName: "multipleSeparator", isSignal: true, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, showOtherMonths: { classPropertyName: "showOtherMonths", publicName: "showOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, selectOtherMonths: { classPropertyName: "selectOtherMonths", publicName: "selectOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, shortYearCutoff: { classPropertyName: "shortYearCutoff", publicName: "shortYearCutoff", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "showOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: true, isRequired: false, transformFunction: null }, startWeekFromFirstDayOfYear: { classPropertyName: "startWeekFromFirstDayOfYear", publicName: "startWeekFromFirstDayOfYear", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, dataType: { classPropertyName: "dataType", publicName: "dataType", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, maxDateCount: { classPropertyName: "maxDateCount", publicName: "maxDateCount", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, todayButtonStyleClass: { classPropertyName: "todayButtonStyleClass", publicName: "todayButtonStyleClass", isSignal: true, isRequired: false, transformFunction: null }, clearButtonStyleClass: { classPropertyName: "clearButtonStyleClass", publicName: "clearButtonStyleClass", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, keepInvalid: { classPropertyName: "keepInvalid", publicName: "keepInvalid", isSignal: true, isRequired: false, transformFunction: null }, hideOnDateTimeSelect: { classPropertyName: "hideOnDateTimeSelect", publicName: "hideOnDateTimeSelect", isSignal: true, isRequired: false, transformFunction: null }, touchUI: { classPropertyName: "touchUI", publicName: "touchUI", isSignal: true, isRequired: false, transformFunction: null }, timeSeparator: { classPropertyName: "timeSeparator", publicName: "timeSeparator", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", 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 }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, responsiveOptions: { classPropertyName: "responsiveOptions", publicName: "responsiveOptions", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onClose: "onClose", onSelect: "onSelect", onClear: "onClear", onInput: "onInput", onTodayClick: "onTodayClick", onClearClick: "onClearClick", onMonthChange: "onMonthChange", onYearChange: "onYearChange", onClickOutside: "onClickOutside", onShow: "onShow" }, host: { properties: { "class": "cx('root')", "style": "sx('root')" } }, providers: [DATEPICKER_VALUE_ACCESSOR, DatePickerStyle, { provide: DATEPICKER_INSTANCE, useExisting: DatePicker }, { provide: PARENT_INSTANCE, useExisting: DatePicker }], queries: [{ propertyName: "dateTemplate", first: true, predicate: ["date"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "disabledDateTemplate", first: true, predicate: ["disabledDate"], isSignal: true }, { propertyName: "decadeTemplate", first: true, predicate: ["decade"], isSignal: true }, { propertyName: "previousIconTemplate", first: true, predicate: ["previousicon"], isSignal: true }, { propertyName: "nextIconTemplate", first: true, predicate: ["nexticon"], isSignal: true }, { propertyName: "triggerIconTemplate", first: true, predicate: ["triggericon"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "decrementIconTemplate", first: true, predicate: ["decrementicon"], isSignal: true }, { propertyName: "incrementIconTemplate", first: true, predicate: ["incrementicon"], isSignal: true }, { propertyName: "inputIconTemplate", first: true, predicate: ["inputicon"], isSignal: true }, { propertyName: "buttonBarTemplate", first: true, predicate: ["buttonbar"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "inputfieldViewChild", first: true, predicate: ["inputfield"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
3368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DatePicker, isStandalone: true, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: { iconDisplay: { classPropertyName: "iconDisplay", publicName: "iconDisplay", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", 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 }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, multipleSeparator: { classPropertyName: "multipleSeparator", publicName: "multipleSeparator", isSignal: true, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, showOtherMonths: { classPropertyName: "showOtherMonths", publicName: "showOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, selectOtherMonths: { classPropertyName: "selectOtherMonths", publicName: "selectOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, shortYearCutoff: { classPropertyName: "shortYearCutoff", publicName: "shortYearCutoff", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "showOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: true, isRequired: false, transformFunction: null }, startWeekFromFirstDayOfYear: { classPropertyName: "startWeekFromFirstDayOfYear", publicName: "startWeekFromFirstDayOfYear", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, dataType: { classPropertyName: "dataType", publicName: "dataType", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, maxDateCount: { classPropertyName: "maxDateCount", publicName: "maxDateCount", isSignal: true, isRequired: false, transformFunction: null }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: true, isRequired: false, transformFunction: null }, todayButtonStyleClass: { classPropertyName: "todayButtonStyleClass", publicName: "todayButtonStyleClass", isSignal: true, isRequired: false, transformFunction: null }, clearButtonStyleClass: { classPropertyName: "clearButtonStyleClass", publicName: "clearButtonStyleClass", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, keepInvalid: { classPropertyName: "keepInvalid", publicName: "keepInvalid", isSignal: true, isRequired: false, transformFunction: null }, hideOnDateTimeSelect: { classPropertyName: "hideOnDateTimeSelect", publicName: "hideOnDateTimeSelect", isSignal: true, isRequired: false, transformFunction: null }, touchUI: { classPropertyName: "touchUI", publicName: "touchUI", isSignal: true, isRequired: false, transformFunction: null }, timeSeparator: { classPropertyName: "timeSeparator", publicName: "timeSeparator", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", 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 }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, responsiveOptions: { classPropertyName: "responsiveOptions", publicName: "responsiveOptions", isSignal: true, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onClose: "onClose", onSelect: "onSelect", onClear: "onClear", onInput: "onInput", onTodayClick: "onTodayClick", onClearClick: "onClearClick", onMonthChange: "onMonthChange", onYearChange: "onYearChange", onClickOutside: "onClickOutside", onShow: "onShow" }, host: { properties: { "class": "cx('root')", "style": "sx('root')" } }, providers: [DATEPICKER_VALUE_ACCESSOR, DatePickerStyle, { provide: DATEPICKER_INSTANCE, useExisting: DatePicker }, { provide: PARENT_INSTANCE, useExisting: DatePicker }], queries: [{ propertyName: "dateTemplate", first: true, predicate: ["date"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "disabledDateTemplate", first: true, predicate: ["disabledDate"], isSignal: true }, { propertyName: "decadeTemplate", first: true, predicate: ["decade"], isSignal: true }, { propertyName: "previousIconTemplate", first: true, predicate: ["previousicon"], isSignal: true }, { propertyName: "nextIconTemplate", first: true, predicate: ["nexticon"], isSignal: true }, { propertyName: "triggerIconTemplate", first: true, predicate: ["triggericon"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "decrementIconTemplate", first: true, predicate: ["decrementicon"], isSignal: true }, { propertyName: "incrementIconTemplate", first: true, predicate: ["incrementicon"], isSignal: true }, { propertyName: "inputIconTemplate", first: true, predicate: ["inputicon"], isSignal: true }, { propertyName: "buttonBarTemplate", first: true, predicate: ["buttonbar"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "inputfieldViewChild", first: true, predicate: ["inputfield"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
3288
3369
|
@if (!inline()) {
|
|
3289
3370
|
<input
|
|
3290
3371
|
#inputfield
|
|
@@ -3303,6 +3384,7 @@ class DatePicker extends BaseInput {
|
|
|
3303
3384
|
[attr.aria-controls]="overlayVisible() ? panelId : null"
|
|
3304
3385
|
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
3305
3386
|
[attr.aria-label]="ariaLabel()"
|
|
3387
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
3306
3388
|
[value]="inputFieldValue()"
|
|
3307
3389
|
(focus)="onInputFocus($event)"
|
|
3308
3390
|
(keydown)="onInputKeydown($event)"
|
|
@@ -3362,7 +3444,11 @@ class DatePicker extends BaseInput {
|
|
|
3362
3444
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3363
3445
|
<span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
|
|
3364
3446
|
@if (!inputIconTemplate() && !_inputIconTemplate()) {
|
|
3365
|
-
|
|
3447
|
+
@if (icon()) {
|
|
3448
|
+
<span (click)="onButtonClick($event)" [class]="cn(cx('inputIcon'), icon())" [pBind]="ptm('inputIcon')"></span>
|
|
3449
|
+
} @else {
|
|
3450
|
+
<svg data-p-icon="calendar" (click)="onButtonClick($event)" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
|
|
3451
|
+
}
|
|
3366
3452
|
}
|
|
3367
3453
|
|
|
3368
3454
|
<ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
|
|
@@ -3421,7 +3507,7 @@ class DatePicker extends BaseInput {
|
|
|
3421
3507
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3422
3508
|
[class]="cx('selectMonth')"
|
|
3423
3509
|
[attr.disabled]="switchViewButtonDisabled() ? '' : undefined"
|
|
3424
|
-
[attr.aria-label]="
|
|
3510
|
+
[attr.aria-label]="getMonthName(month.month) + ', ' + getTranslation('chooseMonth')"
|
|
3425
3511
|
pRipple
|
|
3426
3512
|
[pBind]="ptm('selectMonth')"
|
|
3427
3513
|
[attr.data-pc-group-section]="'navigator'"
|
|
@@ -3436,7 +3522,7 @@ class DatePicker extends BaseInput {
|
|
|
3436
3522
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3437
3523
|
[class]="cx('selectYear')"
|
|
3438
3524
|
[attr.disabled]="switchViewButtonDisabled() ? '' : undefined"
|
|
3439
|
-
[attr.aria-label]="getTranslation('chooseYear')"
|
|
3525
|
+
[attr.aria-label]="getYear(month) + ', ' + getTranslation('chooseYear')"
|
|
3440
3526
|
pRipple
|
|
3441
3527
|
[pBind]="ptm('selectYear')"
|
|
3442
3528
|
[attr.data-pc-group-section]="'navigator'"
|
|
@@ -3502,7 +3588,7 @@ class DatePicker extends BaseInput {
|
|
|
3502
3588
|
</td>
|
|
3503
3589
|
}
|
|
3504
3590
|
@for (date of week; track $index) {
|
|
3505
|
-
<td [attr.aria-label]="date.
|
|
3591
|
+
<td [attr.aria-label]="formatDate(formatDateMetaToDate(date), 'DD, d MM yy')" [attr.aria-selected]="!!isSelected(date)" [class]="cx('dayCell', { date })" [pBind]="ptm('dayCell')">
|
|
3506
3592
|
@if (date.otherMonth ? showOtherMonths() : true) {
|
|
3507
3593
|
<span
|
|
3508
3594
|
[ngClass]="dayClass(date)"
|
|
@@ -3570,6 +3656,7 @@ class DatePicker extends BaseInput {
|
|
|
3570
3656
|
}
|
|
3571
3657
|
@if ((showTime() || timeOnly()) && currentView() === 'date') {
|
|
3572
3658
|
<div [class]="cx('timePicker')" [pBind]="ptm('timePicker')">
|
|
3659
|
+
<div class="p-hidden-accessible" aria-live="polite" aria-atomic="true">{{ timeAnnouncement() }}</div>
|
|
3573
3660
|
<div [class]="cx('hourPicker')" [pBind]="ptm('hourPicker')">
|
|
3574
3661
|
<p-button
|
|
3575
3662
|
rounded
|
|
@@ -3584,7 +3671,7 @@ class DatePicker extends BaseInput {
|
|
|
3584
3671
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3585
3672
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3586
3673
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3587
|
-
[
|
|
3674
|
+
[ariaLabel]="getTranslation('nextHour')"
|
|
3588
3675
|
[pt]="ptm('pcIncrementButton')"
|
|
3589
3676
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3590
3677
|
>
|
|
@@ -3609,7 +3696,7 @@ class DatePicker extends BaseInput {
|
|
|
3609
3696
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3610
3697
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3611
3698
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3612
|
-
[
|
|
3699
|
+
[ariaLabel]="getTranslation('prevHour')"
|
|
3613
3700
|
[pt]="ptm('pcDecrementButton')"
|
|
3614
3701
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3615
3702
|
>
|
|
@@ -3638,7 +3725,7 @@ class DatePicker extends BaseInput {
|
|
|
3638
3725
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3639
3726
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3640
3727
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3641
|
-
[
|
|
3728
|
+
[ariaLabel]="getTranslation('nextMinute')"
|
|
3642
3729
|
[pt]="ptm('pcIncrementButton')"
|
|
3643
3730
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3644
3731
|
>
|
|
@@ -3663,7 +3750,7 @@ class DatePicker extends BaseInput {
|
|
|
3663
3750
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3664
3751
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3665
3752
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3666
|
-
[
|
|
3753
|
+
[ariaLabel]="getTranslation('prevMinute')"
|
|
3667
3754
|
[pt]="ptm('pcDecrementButton')"
|
|
3668
3755
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3669
3756
|
>
|
|
@@ -3695,7 +3782,7 @@ class DatePicker extends BaseInput {
|
|
|
3695
3782
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3696
3783
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3697
3784
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3698
|
-
[
|
|
3785
|
+
[ariaLabel]="getTranslation('nextSecond')"
|
|
3699
3786
|
[pt]="ptm('pcIncrementButton')"
|
|
3700
3787
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3701
3788
|
>
|
|
@@ -3720,7 +3807,7 @@ class DatePicker extends BaseInput {
|
|
|
3720
3807
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
3721
3808
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
3722
3809
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
3723
|
-
[
|
|
3810
|
+
[ariaLabel]="getTranslation('prevSecond')"
|
|
3724
3811
|
[pt]="ptm('pcDecrementButton')"
|
|
3725
3812
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3726
3813
|
>
|
|
@@ -3748,7 +3835,7 @@ class DatePicker extends BaseInput {
|
|
|
3748
3835
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3749
3836
|
(onClick)="toggleAMPM($event)"
|
|
3750
3837
|
(keydown.enter)="toggleAMPM($event)"
|
|
3751
|
-
[
|
|
3838
|
+
[ariaLabel]="getTranslation('am')"
|
|
3752
3839
|
[pt]="ptm('pcIncrementButton')"
|
|
3753
3840
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3754
3841
|
>
|
|
@@ -3759,7 +3846,7 @@ class DatePicker extends BaseInput {
|
|
|
3759
3846
|
<ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
|
|
3760
3847
|
</ng-template>
|
|
3761
3848
|
</p-button>
|
|
3762
|
-
<span [pBind]="ptm('ampm')">{{ pm() ? '
|
|
3849
|
+
<span [pBind]="ptm('ampm')">{{ getTranslation(pm() ? 'pm' : 'am') }}</span>
|
|
3763
3850
|
<p-button
|
|
3764
3851
|
text
|
|
3765
3852
|
rounded
|
|
@@ -3768,7 +3855,7 @@ class DatePicker extends BaseInput {
|
|
|
3768
3855
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3769
3856
|
(click)="toggleAMPM($event)"
|
|
3770
3857
|
(keydown.enter)="toggleAMPM($event)"
|
|
3771
|
-
[
|
|
3858
|
+
[ariaLabel]="getTranslation('pm')"
|
|
3772
3859
|
[pt]="ptm('pcDecrementButton')"
|
|
3773
3860
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
3774
3861
|
>
|
|
@@ -3822,7 +3909,7 @@ class DatePicker extends BaseInput {
|
|
|
3822
3909
|
</div>
|
|
3823
3910
|
</p-motion>
|
|
3824
3911
|
}
|
|
3825
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: ChevronLeftIcon, selector: "[data-p-icon=\"chevron-left\"]" }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "component", type: ChevronUpIcon, selector: "[data-p-icon=\"chevron-up\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: CalendarIcon, selector: "[data-p-icon=\"calendar\"]" }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "ngmodule", type: MotionModule }, { kind: "component", type: i3.Motion, selector: "p-motion", inputs: ["visible", "mountOnEnter", "unmountOnLeave", "name", "type", "safe", "disabled", "appear", "enter", "leave", "duration", "hideStrategy", "enterFromClass", "enterToClass", "enterActiveClass", "leaveFromClass", "leaveToClass", "leaveActiveClass", "options"], outputs: ["onBeforeEnter", "onEnter", "onAfterEnter", "onEnterCancelled", "onBeforeLeave", "onLeave", "onAfterLeave", "onLeaveCancelled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3912
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "ariaExpanded", "ariaControls", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: ChevronLeftIcon, selector: "[data-p-icon=\"chevron-left\"]" }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "component", type: ChevronUpIcon, selector: "[data-p-icon=\"chevron-up\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "component", type: CalendarIcon, selector: "[data-p-icon=\"calendar\"]" }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "ngmodule", type: MotionModule }, { kind: "component", type: i3.Motion, selector: "p-motion", inputs: ["visible", "mountOnEnter", "unmountOnLeave", "name", "type", "safe", "disabled", "appear", "enter", "leave", "duration", "hideStrategy", "enterFromClass", "enterToClass", "enterActiveClass", "leaveFromClass", "leaveToClass", "leaveActiveClass", "options"], outputs: ["onBeforeEnter", "onEnter", "onAfterEnter", "onEnterCancelled", "onBeforeLeave", "onLeave", "onAfterLeave", "onLeaveCancelled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3826
3913
|
}
|
|
3827
3914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePicker, decorators: [{
|
|
3828
3915
|
type: Component,
|
|
@@ -3849,6 +3936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
3849
3936
|
[attr.aria-controls]="overlayVisible() ? panelId : null"
|
|
3850
3937
|
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
3851
3938
|
[attr.aria-label]="ariaLabel()"
|
|
3939
|
+
[attr.aria-describedby]="ariaDescribedBy()"
|
|
3852
3940
|
[value]="inputFieldValue()"
|
|
3853
3941
|
(focus)="onInputFocus($event)"
|
|
3854
3942
|
(keydown)="onInputKeydown($event)"
|
|
@@ -3908,7 +3996,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
3908
3996
|
@if (iconDisplay() === 'input' && showIcon()) {
|
|
3909
3997
|
<span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
|
|
3910
3998
|
@if (!inputIconTemplate() && !_inputIconTemplate()) {
|
|
3911
|
-
|
|
3999
|
+
@if (icon()) {
|
|
4000
|
+
<span (click)="onButtonClick($event)" [class]="cn(cx('inputIcon'), icon())" [pBind]="ptm('inputIcon')"></span>
|
|
4001
|
+
} @else {
|
|
4002
|
+
<svg data-p-icon="calendar" (click)="onButtonClick($event)" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
|
|
4003
|
+
}
|
|
3912
4004
|
}
|
|
3913
4005
|
|
|
3914
4006
|
<ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
|
|
@@ -3967,7 +4059,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
3967
4059
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3968
4060
|
[class]="cx('selectMonth')"
|
|
3969
4061
|
[attr.disabled]="switchViewButtonDisabled() ? '' : undefined"
|
|
3970
|
-
[attr.aria-label]="
|
|
4062
|
+
[attr.aria-label]="getMonthName(month.month) + ', ' + getTranslation('chooseMonth')"
|
|
3971
4063
|
pRipple
|
|
3972
4064
|
[pBind]="ptm('selectMonth')"
|
|
3973
4065
|
[attr.data-pc-group-section]="'navigator'"
|
|
@@ -3982,7 +4074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
3982
4074
|
(keydown)="onContainerButtonKeydown($event)"
|
|
3983
4075
|
[class]="cx('selectYear')"
|
|
3984
4076
|
[attr.disabled]="switchViewButtonDisabled() ? '' : undefined"
|
|
3985
|
-
[attr.aria-label]="getTranslation('chooseYear')"
|
|
4077
|
+
[attr.aria-label]="getYear(month) + ', ' + getTranslation('chooseYear')"
|
|
3986
4078
|
pRipple
|
|
3987
4079
|
[pBind]="ptm('selectYear')"
|
|
3988
4080
|
[attr.data-pc-group-section]="'navigator'"
|
|
@@ -4048,7 +4140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4048
4140
|
</td>
|
|
4049
4141
|
}
|
|
4050
4142
|
@for (date of week; track $index) {
|
|
4051
|
-
<td [attr.aria-label]="date.
|
|
4143
|
+
<td [attr.aria-label]="formatDate(formatDateMetaToDate(date), 'DD, d MM yy')" [attr.aria-selected]="!!isSelected(date)" [class]="cx('dayCell', { date })" [pBind]="ptm('dayCell')">
|
|
4052
4144
|
@if (date.otherMonth ? showOtherMonths() : true) {
|
|
4053
4145
|
<span
|
|
4054
4146
|
[ngClass]="dayClass(date)"
|
|
@@ -4116,6 +4208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4116
4208
|
}
|
|
4117
4209
|
@if ((showTime() || timeOnly()) && currentView() === 'date') {
|
|
4118
4210
|
<div [class]="cx('timePicker')" [pBind]="ptm('timePicker')">
|
|
4211
|
+
<div class="p-hidden-accessible" aria-live="polite" aria-atomic="true">{{ timeAnnouncement() }}</div>
|
|
4119
4212
|
<div [class]="cx('hourPicker')" [pBind]="ptm('hourPicker')">
|
|
4120
4213
|
<p-button
|
|
4121
4214
|
rounded
|
|
@@ -4130,7 +4223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4130
4223
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4131
4224
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4132
4225
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4133
|
-
[
|
|
4226
|
+
[ariaLabel]="getTranslation('nextHour')"
|
|
4134
4227
|
[pt]="ptm('pcIncrementButton')"
|
|
4135
4228
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4136
4229
|
>
|
|
@@ -4155,7 +4248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4155
4248
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4156
4249
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4157
4250
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4158
|
-
[
|
|
4251
|
+
[ariaLabel]="getTranslation('prevHour')"
|
|
4159
4252
|
[pt]="ptm('pcDecrementButton')"
|
|
4160
4253
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4161
4254
|
>
|
|
@@ -4184,7 +4277,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4184
4277
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4185
4278
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4186
4279
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4187
|
-
[
|
|
4280
|
+
[ariaLabel]="getTranslation('nextMinute')"
|
|
4188
4281
|
[pt]="ptm('pcIncrementButton')"
|
|
4189
4282
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4190
4283
|
>
|
|
@@ -4209,7 +4302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4209
4302
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4210
4303
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4211
4304
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4212
|
-
[
|
|
4305
|
+
[ariaLabel]="getTranslation('prevMinute')"
|
|
4213
4306
|
[pt]="ptm('pcDecrementButton')"
|
|
4214
4307
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4215
4308
|
>
|
|
@@ -4241,7 +4334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4241
4334
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4242
4335
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4243
4336
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4244
|
-
[
|
|
4337
|
+
[ariaLabel]="getTranslation('nextSecond')"
|
|
4245
4338
|
[pt]="ptm('pcIncrementButton')"
|
|
4246
4339
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4247
4340
|
>
|
|
@@ -4266,7 +4359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4266
4359
|
(keyup.enter)="onTimePickerElementMouseUp($event)"
|
|
4267
4360
|
(keyup.space)="onTimePickerElementMouseUp($event)"
|
|
4268
4361
|
(mouseleave)="onTimePickerElementMouseLeave()"
|
|
4269
|
-
[
|
|
4362
|
+
[ariaLabel]="getTranslation('prevSecond')"
|
|
4270
4363
|
[pt]="ptm('pcDecrementButton')"
|
|
4271
4364
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4272
4365
|
>
|
|
@@ -4294,7 +4387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4294
4387
|
(keydown)="onContainerButtonKeydown($event)"
|
|
4295
4388
|
(onClick)="toggleAMPM($event)"
|
|
4296
4389
|
(keydown.enter)="toggleAMPM($event)"
|
|
4297
|
-
[
|
|
4390
|
+
[ariaLabel]="getTranslation('am')"
|
|
4298
4391
|
[pt]="ptm('pcIncrementButton')"
|
|
4299
4392
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4300
4393
|
>
|
|
@@ -4305,7 +4398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4305
4398
|
<ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
|
|
4306
4399
|
</ng-template>
|
|
4307
4400
|
</p-button>
|
|
4308
|
-
<span [pBind]="ptm('ampm')">{{ pm() ? '
|
|
4401
|
+
<span [pBind]="ptm('ampm')">{{ getTranslation(pm() ? 'pm' : 'am') }}</span>
|
|
4309
4402
|
<p-button
|
|
4310
4403
|
text
|
|
4311
4404
|
rounded
|
|
@@ -4314,7 +4407,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4314
4407
|
(keydown)="onContainerButtonKeydown($event)"
|
|
4315
4408
|
(click)="toggleAMPM($event)"
|
|
4316
4409
|
(keydown.enter)="toggleAMPM($event)"
|
|
4317
|
-
[
|
|
4410
|
+
[ariaLabel]="getTranslation('pm')"
|
|
4318
4411
|
[pt]="ptm('pcDecrementButton')"
|
|
4319
4412
|
[attr.data-pc-group-section]="'timepickerbutton'"
|
|
4320
4413
|
>
|
|
@@ -4377,7 +4470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
4377
4470
|
'[style]': "sx('root')"
|
|
4378
4471
|
}
|
|
4379
4472
|
}]
|
|
4380
|
-
}], ctorParameters: () => [], propDecorators: { iconDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconDisplay", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyleClass", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], iconAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAriaLabel", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], multipleSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleSeparator", required: false }] }], rangeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeSeparator", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], showOtherMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOtherMonths", required: false }] }], selectOtherMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOtherMonths", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], shortYearCutoff: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortYearCutoff", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], stepHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepHour", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], stepSecond: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepSecond", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnFocus", required: false }] }], showWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeek", required: false }] }], startWeekFromFirstDayOfYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "startWeekFromFirstDayOfYear", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], dataType: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataType", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], maxDateCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDateCount", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], todayButtonStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayButtonStyleClass", required: false }] }], clearButtonStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonStyleClass", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], keepInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepInvalid", required: false }] }], hideOnDateTimeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideOnDateTimeSelect", required: false }] }], touchUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUI", required: false }] }], timeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeSeparator", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], responsiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsiveOptions", required: false }] }], numberOfMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfMonths", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onInput: [{ type: i0.Output, args: ["onInput"] }], onTodayClick: [{ type: i0.Output, args: ["onTodayClick"] }], onClearClick: [{ type: i0.Output, args: ["onClearClick"] }], onMonthChange: [{ type: i0.Output, args: ["onMonthChange"] }], onYearChange: [{ type: i0.Output, args: ["onYearChange"] }], onClickOutside: [{ type: i0.Output, args: ["onClickOutside"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], inputfieldViewChild: [{ type: i0.ViewChild, args: ['inputfield', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }], dateTemplate: [{ type: i0.ContentChild, args: ['date', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], disabledDateTemplate: [{ type: i0.ContentChild, args: ['disabledDate', { ...{ descendants: false }, isSignal: true }] }], decadeTemplate: [{ type: i0.ContentChild, args: ['decade', { ...{ descendants: false }, isSignal: true }] }], previousIconTemplate: [{ type: i0.ContentChild, args: ['previousicon', { ...{ descendants: false }, isSignal: true }] }], nextIconTemplate: [{ type: i0.ContentChild, args: ['nexticon', { ...{ descendants: false }, isSignal: true }] }], triggerIconTemplate: [{ type: i0.ContentChild, args: ['triggericon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], decrementIconTemplate: [{ type: i0.ContentChild, args: ['decrementicon', { ...{ descendants: false }, isSignal: true }] }], incrementIconTemplate: [{ type: i0.ContentChild, args: ['incrementicon', { ...{ descendants: false }, isSignal: true }] }], inputIconTemplate: [{ type: i0.ContentChild, args: ['inputicon', { ...{ descendants: false }, isSignal: true }] }], buttonBarTemplate: [{ type: i0.ContentChild, args: ['buttonbar', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
4473
|
+
}], ctorParameters: () => [], propDecorators: { iconDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconDisplay", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyleClass", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], iconAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconAriaLabel", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], multipleSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleSeparator", required: false }] }], rangeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeSeparator", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], showOtherMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOtherMonths", required: false }] }], selectOtherMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOtherMonths", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], shortYearCutoff: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortYearCutoff", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], stepHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepHour", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], stepSecond: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepSecond", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnFocus", required: false }] }], showWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeek", required: false }] }], startWeekFromFirstDayOfYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "startWeekFromFirstDayOfYear", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], dataType: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataType", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], maxDateCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDateCount", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], todayButtonStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayButtonStyleClass", required: false }] }], clearButtonStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonStyleClass", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], keepInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepInvalid", required: false }] }], hideOnDateTimeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideOnDateTimeSelect", required: false }] }], touchUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchUI", required: false }] }], timeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeSeparator", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], responsiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsiveOptions", required: false }] }], numberOfMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfMonths", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], defaultDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultDate", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onInput: [{ type: i0.Output, args: ["onInput"] }], onTodayClick: [{ type: i0.Output, args: ["onTodayClick"] }], onClearClick: [{ type: i0.Output, args: ["onClearClick"] }], onMonthChange: [{ type: i0.Output, args: ["onMonthChange"] }], onYearChange: [{ type: i0.Output, args: ["onYearChange"] }], onClickOutside: [{ type: i0.Output, args: ["onClickOutside"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], inputfieldViewChild: [{ type: i0.ViewChild, args: ['inputfield', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }], dateTemplate: [{ type: i0.ContentChild, args: ['date', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], disabledDateTemplate: [{ type: i0.ContentChild, args: ['disabledDate', { ...{ descendants: false }, isSignal: true }] }], decadeTemplate: [{ type: i0.ContentChild, args: ['decade', { ...{ descendants: false }, isSignal: true }] }], previousIconTemplate: [{ type: i0.ContentChild, args: ['previousicon', { ...{ descendants: false }, isSignal: true }] }], nextIconTemplate: [{ type: i0.ContentChild, args: ['nexticon', { ...{ descendants: false }, isSignal: true }] }], triggerIconTemplate: [{ type: i0.ContentChild, args: ['triggericon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], decrementIconTemplate: [{ type: i0.ContentChild, args: ['decrementicon', { ...{ descendants: false }, isSignal: true }] }], incrementIconTemplate: [{ type: i0.ContentChild, args: ['incrementicon', { ...{ descendants: false }, isSignal: true }] }], inputIconTemplate: [{ type: i0.ContentChild, args: ['inputicon', { ...{ descendants: false }, isSignal: true }] }], buttonBarTemplate: [{ type: i0.ContentChild, args: ['buttonbar', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
4381
4474
|
class DatePickerModule {
|
|
4382
4475
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4383
4476
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: DatePickerModule, imports: [DatePicker, SharedModule], exports: [DatePicker, SharedModule] });
|