@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.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.
Files changed (265) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  68. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  70. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  72. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
  74. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  76. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  78. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  80. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  82. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  84. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  86. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  88. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  90. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  92. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
  94. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
  96. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  98. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  100. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  102. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
  104. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  106. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  108. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  110. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  112. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  114. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  116. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  118. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
  120. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  122. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  124. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  126. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  128. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  130. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
  132. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  134. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  136. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  138. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  140. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  142. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  144. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  146. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
  148. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  150. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  152. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
  154. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  156. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  158. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  160. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  162. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  164. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  166. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
  168. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  170. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  171. package/package.json +5 -5
  172. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  173. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  174. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  175. package/schematics/migrations.json +7 -2
  176. package/schematics/utils/removed-inputs.js +0 -0
  177. package/schematics/utils/renamed-inputs.js +175 -0
  178. package/schematics/utils/styleclass.js +24 -8
  179. package/schematics/utils/versions.json +8 -8
  180. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  181. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  182. package/types/exhaustive-ui-core-api.d.ts +2 -3
  183. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  184. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  185. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  186. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  187. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  188. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  189. package/types/exhaustive-ui-core-button.d.ts +57 -89
  190. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  191. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  192. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  193. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  194. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  195. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  196. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  197. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  198. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  199. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  200. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  201. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  202. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  203. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  204. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  205. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  206. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  207. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  208. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  209. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  210. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  211. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  212. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  213. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  214. package/types/exhaustive-ui-core-image.d.ts +35 -68
  215. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  216. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  217. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  218. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  219. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  220. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  221. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  222. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  223. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  224. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  225. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  226. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  227. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  228. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  229. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  230. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  231. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  232. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  233. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  234. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  235. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  236. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  237. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  238. package/types/exhaustive-ui-core-password.d.ts +56 -93
  239. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  240. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  241. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  242. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  243. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  244. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  245. package/types/exhaustive-ui-core-select.d.ts +137 -188
  246. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  247. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  248. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  249. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  250. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  251. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  252. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  253. package/types/exhaustive-ui-core-table.d.ts +349 -453
  254. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  255. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  256. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  257. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  258. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  259. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  260. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  261. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  262. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  263. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  264. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  265. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -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, computed, output, viewChild, contentChild, contentChildren, numberAttribute, booleanAttribute, ViewChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { Injectable, forwardRef, InjectionToken, inject, NgZone, input, booleanAttribute, numberAttribute, computed, output, viewChild, signal, contentChild, linkedSignal, effect, untracked, afterNextRender, afterEveryRender, 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';
@@ -41,8 +41,8 @@ const classes = {
41
41
  'p-datepicker-fluid': instance.hasFluid,
42
42
  'p-inputwrapper-filled': instance.$filled(),
43
43
  'p-variant-filled': instance.$variant() === 'filled',
44
- 'p-inputwrapper-focus': instance.focus || instance.overlayVisible,
45
- 'p-focus': instance.focus || instance.overlayVisible
44
+ 'p-inputwrapper-focus': instance.focus() || instance.overlayVisible(),
45
+ 'p-focus': instance.focus() || instance.overlayVisible()
46
46
  }
47
47
  ],
48
48
  pcInputText: 'p-datepicker-input',
@@ -53,9 +53,9 @@ const classes = {
53
53
  'p-datepicker-panel p-component',
54
54
  {
55
55
  'p-datepicker-panel p-component': true,
56
- 'p-datepicker-panel-inline': instance.inline,
56
+ 'p-datepicker-panel-inline': instance.inline(),
57
57
  'p-disabled': instance.$disabled(),
58
- 'p-datepicker-timeonly': instance.timeOnly
58
+ 'p-datepicker-timeonly': instance.timeOnly()
59
59
  }
60
60
  ],
61
61
  calendarContainer: 'p-datepicker-calendar-container',
@@ -83,8 +83,8 @@ const classes = {
83
83
  day: ({ instance, date }) => {
84
84
  let selectedDayClass = '';
85
85
  if (instance.isRangeSelection() && instance.isSelected(date) && date.selectable) {
86
- const startDate = instance.value[0];
87
- const endDate = instance.value[1];
86
+ const startDate = instance.value()[0];
87
+ const endDate = instance.value()[1];
88
88
  const isStart = startDate && date.year === startDate.getFullYear() && date.month === startDate.getMonth() && date.day === startDate.getDate();
89
89
  const isEnd = endDate && date.year === endDate.getFullYear() && date.month === endDate.getMonth() && date.day === endDate.getDate();
90
90
  selectedDayClass = isStart || isEnd ? 'p-datepicker-day-selected' : 'p-datepicker-day-selected-range';
@@ -321,390 +321,309 @@ class DatePicker extends BaseInput {
321
321
  componentName = 'DatePicker';
322
322
  bindDirectiveInstance = inject(Bind, { self: true });
323
323
  $pcDatePicker = inject(DATEPICKER_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
324
- iconDisplay = 'button';
325
- /**
326
- * Style class of the component.
327
- * @deprecated since v20.0.0, use `class` instead.
328
- * @group Props
329
- */
330
- styleClass;
324
+ iconDisplay = input('button', /* @ts-ignore */
325
+ ...(ngDevMode ? [{ debugName: "iconDisplay" }] : /* istanbul ignore next */ []));
331
326
  /**
332
327
  * Inline style of the input field.
333
328
  * @group Props
334
329
  */
335
- inputStyle;
330
+ inputStyle = input(/* @ts-ignore */
331
+ ...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : /* istanbul ignore next */ []));
336
332
  /**
337
333
  * Identifier of the focus input to match a label defined for the component.
338
334
  * @group Props
339
335
  */
340
- inputId;
336
+ inputId = input(/* @ts-ignore */
337
+ ...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
341
338
  /**
342
339
  * Style class of the input field.
343
340
  * @group Props
344
341
  */
345
- inputStyleClass;
342
+ inputStyleClass = input(/* @ts-ignore */
343
+ ...(ngDevMode ? [undefined, { debugName: "inputStyleClass" }] : /* istanbul ignore next */ []));
346
344
  /**
347
345
  * Placeholder text for the input.
348
346
  * @group Props
349
347
  */
350
- placeholder;
348
+ placeholder = input(/* @ts-ignore */
349
+ ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
351
350
  /**
352
351
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
353
352
  * @group Props
354
353
  */
355
- ariaLabelledBy;
354
+ ariaLabelledBy = input(/* @ts-ignore */
355
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
356
356
  /**
357
357
  * Defines a string that labels the input for accessibility.
358
358
  * @group Props
359
359
  */
360
- ariaLabel;
360
+ ariaLabel = input(/* @ts-ignore */
361
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
361
362
  /**
362
363
  * Defines a string that labels the icon button for accessibility.
363
364
  * @group Props
364
365
  */
365
- iconAriaLabel;
366
+ iconAriaLabel = input(/* @ts-ignore */
367
+ ...(ngDevMode ? [undefined, { debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []));
366
368
  /**
367
369
  * Format of the date which can also be defined at locale settings.
368
370
  * @group Props
369
371
  */
370
- get dateFormat() {
371
- return this._dateFormat;
372
- }
373
- set dateFormat(value) {
374
- this._dateFormat = value;
375
- if (this.initialized) {
376
- this.updateInputfield();
377
- }
378
- }
372
+ dateFormat = input(/* @ts-ignore */
373
+ ...(ngDevMode ? [undefined, { debugName: "dateFormat" }] : /* istanbul ignore next */ []));
379
374
  /**
380
375
  * Separator for multiple selection mode.
381
376
  * @group Props
382
377
  */
383
- multipleSeparator = ',';
378
+ multipleSeparator = input(',', /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "multipleSeparator" }] : /* istanbul ignore next */ []));
384
380
  /**
385
381
  * Separator for joining start and end dates on range selection mode.
386
382
  * @group Props
387
383
  */
388
- rangeSeparator = '-';
384
+ rangeSeparator = input('-', /* @ts-ignore */
385
+ ...(ngDevMode ? [{ debugName: "rangeSeparator" }] : /* istanbul ignore next */ []));
389
386
  /**
390
387
  * When enabled, displays the datepicker as inline. Default is false for popup mode.
391
388
  * @group Props
392
389
  */
393
- inline = false;
390
+ inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
394
391
  /**
395
392
  * Whether to display dates in other months (non-selectable) at the start or end of the current month. To make these days selectable use the selectOtherMonths option.
396
393
  * @group Props
397
394
  */
398
- showOtherMonths = true;
395
+ showOtherMonths = input(true, { ...(ngDevMode ? { debugName: "showOtherMonths" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
399
396
  /**
400
397
  * Whether days in other months shown before or after the current month are selectable. This only applies if the showOtherMonths option is set to true.
401
398
  * @group Props
402
399
  */
403
- selectOtherMonths;
400
+ selectOtherMonths = input(undefined, { ...(ngDevMode ? { debugName: "selectOtherMonths" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
404
401
  /**
405
402
  * When enabled, displays a button with icon next to input.
406
403
  * @group Props
407
404
  */
408
- showIcon;
405
+ showIcon = input(undefined, { ...(ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
409
406
  /**
410
407
  * Icon of the datepicker button.
411
408
  * @group Props
412
409
  */
413
- icon;
410
+ icon = input(/* @ts-ignore */
411
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
414
412
  /**
415
413
  * When specified, prevents entering the date manually with keyboard.
416
414
  * @group Props
417
415
  */
418
- readonlyInput;
416
+ readonlyInput = input(undefined, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
419
417
  /**
420
418
  * The cutoff year for determining the century for a date.
421
419
  * @group Props
422
420
  */
423
- shortYearCutoff = '+10';
421
+ shortYearCutoff = input('+10', /* @ts-ignore */
422
+ ...(ngDevMode ? [{ debugName: "shortYearCutoff" }] : /* istanbul ignore next */ []));
424
423
  /**
425
424
  * Specifies 12 or 24 hour format.
426
425
  * @group Props
427
426
  */
428
- get hourFormat() {
429
- return this._hourFormat;
430
- }
431
- set hourFormat(value) {
432
- this._hourFormat = value;
433
- if (this.initialized) {
434
- this.updateInputfield();
435
- }
436
- }
427
+ hourFormat = input('24', /* @ts-ignore */
428
+ ...(ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []));
437
429
  /**
438
430
  * Whether to display timepicker only.
439
431
  * @group Props
440
432
  */
441
- timeOnly;
433
+ timeOnly = input(undefined, { ...(ngDevMode ? { debugName: "timeOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
442
434
  /**
443
435
  * Hours to change per step.
444
436
  * @group Props
445
437
  */
446
- stepHour = 1;
438
+ stepHour = input(1, { ...(ngDevMode ? { debugName: "stepHour" } : /* istanbul ignore next */ {}), transform: numberAttribute });
447
439
  /**
448
440
  * Minutes to change per step.
449
441
  * @group Props
450
442
  */
451
- stepMinute = 1;
443
+ stepMinute = input(1, { ...(ngDevMode ? { debugName: "stepMinute" } : /* istanbul ignore next */ {}), transform: numberAttribute });
452
444
  /**
453
445
  * Seconds to change per step.
454
446
  * @group Props
455
447
  */
456
- stepSecond = 1;
448
+ stepSecond = input(1, { ...(ngDevMode ? { debugName: "stepSecond" } : /* istanbul ignore next */ {}), transform: numberAttribute });
457
449
  /**
458
450
  * Whether to show the seconds in time picker.
459
451
  * @group Props
460
452
  */
461
- showSeconds = false;
453
+ showSeconds = input(false, { ...(ngDevMode ? { debugName: "showSeconds" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
462
454
  /**
463
455
  * When disabled, datepicker will not be visible with input focus.
464
456
  * @group Props
465
457
  */
466
- showOnFocus = true;
458
+ showOnFocus = input(true, { ...(ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
467
459
  /**
468
460
  * When enabled, datepicker will show week numbers.
469
461
  * @group Props
470
462
  */
471
- showWeek = false;
463
+ showWeek = input(false, { ...(ngDevMode ? { debugName: "showWeek" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
472
464
  /**
473
465
  * When enabled, datepicker will start week numbers from first day of the year.
474
466
  * @group Props
475
467
  */
476
- startWeekFromFirstDayOfYear = false;
468
+ startWeekFromFirstDayOfYear = input(false, /* @ts-ignore */
469
+ ...(ngDevMode ? [{ debugName: "startWeekFromFirstDayOfYear" }] : /* istanbul ignore next */ []));
477
470
  /**
478
471
  * When enabled, a clear icon is displayed to clear the value.
479
472
  * @group Props
480
473
  */
481
- showClear = false;
474
+ showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
482
475
  /**
483
476
  * Type of the value to write back to ngModel, default is date and alternative is string.
484
477
  * @group Props
485
478
  */
486
- dataType = 'date';
479
+ dataType = input('date', /* @ts-ignore */
480
+ ...(ngDevMode ? [{ debugName: "dataType" }] : /* istanbul ignore next */ []));
487
481
  /**
488
482
  * Defines the quantity of the selection, valid values are "single", "multiple" and "range".
489
483
  * @group Props
490
484
  */
491
- selectionMode = 'single';
485
+ selectionMode = input('single', /* @ts-ignore */
486
+ ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
492
487
  /**
493
488
  * Maximum number of selectable dates in multiple mode.
494
489
  * @group Props
495
490
  */
496
- maxDateCount;
491
+ maxDateCount = input(undefined, { ...(ngDevMode ? { debugName: "maxDateCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
497
492
  /**
498
493
  * Whether to display today and clear buttons at the footer
499
494
  * @group Props
500
495
  */
501
- showButtonBar;
496
+ showButtonBar = input(undefined, { ...(ngDevMode ? { debugName: "showButtonBar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
502
497
  /**
503
498
  * Style class of the today button.
504
499
  * @group Props
505
500
  */
506
- todayButtonStyleClass;
501
+ todayButtonStyleClass = input(/* @ts-ignore */
502
+ ...(ngDevMode ? [undefined, { debugName: "todayButtonStyleClass" }] : /* istanbul ignore next */ []));
507
503
  /**
508
504
  * Style class of the clear button.
509
505
  * @group Props
510
506
  */
511
- clearButtonStyleClass;
507
+ clearButtonStyleClass = input(/* @ts-ignore */
508
+ ...(ngDevMode ? [undefined, { debugName: "clearButtonStyleClass" }] : /* istanbul ignore next */ []));
512
509
  /**
513
510
  * When present, it specifies that the component should automatically get focus on load.
514
511
  * @group Props
515
512
  */
516
- autofocus;
513
+ autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
517
514
  /**
518
515
  * Whether to automatically manage layering.
519
516
  * @group Props
520
517
  */
521
- autoZIndex = true;
518
+ autoZIndex = input(true, { ...(ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
522
519
  /**
523
520
  * Base zIndex value to use in layering.
524
521
  * @group Props
525
522
  */
526
- baseZIndex = 0;
523
+ baseZIndex = input(0, { ...(ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
527
524
  /**
528
525
  * Style class of the datetimepicker container element.
529
526
  * @group Props
530
527
  */
531
- panelStyleClass;
528
+ panelStyleClass = input(/* @ts-ignore */
529
+ ...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
532
530
  /**
533
531
  * Inline style of the datetimepicker container element.
534
532
  * @group Props
535
533
  */
536
- panelStyle;
534
+ panelStyle = input(/* @ts-ignore */
535
+ ...(ngDevMode ? [undefined, { debugName: "panelStyle" }] : /* istanbul ignore next */ []));
537
536
  /**
538
537
  * Keep invalid value when input blur.
539
538
  * @group Props
540
539
  */
541
- keepInvalid = false;
540
+ keepInvalid = input(false, { ...(ngDevMode ? { debugName: "keepInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
542
541
  /**
543
542
  * Whether to hide the overlay on date selection.
544
543
  * @group Props
545
544
  */
546
- hideOnDateTimeSelect = true;
545
+ hideOnDateTimeSelect = input(true, { ...(ngDevMode ? { debugName: "hideOnDateTimeSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
547
546
  /**
548
547
  * When enabled, datepicker overlay is displayed as optimized for touch devices.
549
548
  * @group Props
550
549
  */
551
- touchUI;
550
+ touchUI = input(undefined, { ...(ngDevMode ? { debugName: "touchUI" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
552
551
  /**
553
552
  * Separator of time selector.
554
553
  * @group Props
555
554
  */
556
- timeSeparator = ':';
555
+ timeSeparator = input(':', /* @ts-ignore */
556
+ ...(ngDevMode ? [{ debugName: "timeSeparator" }] : /* istanbul ignore next */ []));
557
557
  /**
558
558
  * When enabled, can only focus on elements inside the datepicker.
559
559
  * @group Props
560
560
  */
561
- focusTrap = true;
562
- /**
563
- * Transition options of the show animation.
564
- * @group Props
565
- * @deprecated since v21.0.0, use `motionOptions` instead.
566
- */
567
- showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
568
- /**
569
- * Transition options of the hide animation.
570
- * @group Props
571
- * @deprecated since v21.0.0, use `motionOptions` instead.
572
- */
573
- hideTransitionOptions = '.1s linear';
561
+ focusTrap = input(true, { ...(ngDevMode ? { debugName: "focusTrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
574
562
  /**
575
563
  * Index of the element in tabbing order.
576
564
  * @group Props
577
565
  */
578
- tabindex;
566
+ tabindex = input(undefined, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
579
567
  /**
580
568
  * The minimum selectable date.
581
569
  * @group Props
582
570
  */
583
- get minDate() {
584
- return this._minDate;
585
- }
586
- set minDate(date) {
587
- this._minDate = date;
588
- if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) {
589
- this.createMonths(this.currentMonth, this.currentYear);
590
- }
591
- }
571
+ minDate = input(/* @ts-ignore */
572
+ ...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
592
573
  /**
593
574
  * The maximum selectable date.
594
575
  * @group Props
595
576
  */
596
- get maxDate() {
597
- return this._maxDate;
598
- }
599
- set maxDate(date) {
600
- this._maxDate = date;
601
- if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) {
602
- this.createMonths(this.currentMonth, this.currentYear);
603
- }
604
- }
577
+ maxDate = input(/* @ts-ignore */
578
+ ...(ngDevMode ? [undefined, { debugName: "maxDate" }] : /* istanbul ignore next */ []));
605
579
  /**
606
580
  * Array with dates that should be disabled (not selectable).
607
581
  * @group Props
608
582
  */
609
- get disabledDates() {
610
- return this._disabledDates;
611
- }
612
- set disabledDates(disabledDates) {
613
- this._disabledDates = disabledDates;
614
- if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) {
615
- this.createMonths(this.currentMonth, this.currentYear);
616
- }
617
- }
583
+ disabledDates = input(/* @ts-ignore */
584
+ ...(ngDevMode ? [undefined, { debugName: "disabledDates" }] : /* istanbul ignore next */ []));
618
585
  /**
619
586
  * Array with weekday numbers that should be disabled (not selectable).
620
587
  * @group Props
621
588
  */
622
- get disabledDays() {
623
- return this._disabledDays;
624
- }
625
- set disabledDays(disabledDays) {
626
- this._disabledDays = disabledDays;
627
- if (this.currentMonth != undefined && this.currentMonth != null && this.currentYear) {
628
- this.createMonths(this.currentMonth, this.currentYear);
629
- }
630
- }
589
+ disabledDays = input(/* @ts-ignore */
590
+ ...(ngDevMode ? [undefined, { debugName: "disabledDays" }] : /* istanbul ignore next */ []));
631
591
  /**
632
592
  * Whether to display timepicker.
633
593
  * @group Props
634
594
  */
635
- get showTime() {
636
- return this._showTime;
637
- }
638
- set showTime(showTime) {
639
- this._showTime = showTime;
640
- if (this.currentHour === undefined) {
641
- this.initTime(this.value || new Date());
642
- }
643
- this.updateInputfield();
644
- }
595
+ showTime = input(/* @ts-ignore */
596
+ ...(ngDevMode ? [undefined, { debugName: "showTime" }] : /* istanbul ignore next */ []));
645
597
  /**
646
598
  * An array of options for responsive design.
647
599
  * @group Props
648
600
  */
649
- get responsiveOptions() {
650
- return this._responsiveOptions;
651
- }
652
- set responsiveOptions(responsiveOptions) {
653
- this._responsiveOptions = responsiveOptions;
654
- this.destroyResponsiveStyleElement();
655
- this.createResponsiveStyle();
656
- }
601
+ responsiveOptions = input(/* @ts-ignore */
602
+ ...(ngDevMode ? [undefined, { debugName: "responsiveOptions" }] : /* istanbul ignore next */ []));
657
603
  /**
658
604
  * Number of months to display.
659
605
  * @group Props
660
606
  */
661
- get numberOfMonths() {
662
- return this._numberOfMonths;
663
- }
664
- set numberOfMonths(numberOfMonths) {
665
- this._numberOfMonths = numberOfMonths;
666
- this.destroyResponsiveStyleElement();
667
- this.createResponsiveStyle();
668
- }
607
+ numberOfMonths = input(1, /* @ts-ignore */
608
+ ...(ngDevMode ? [{ debugName: "numberOfMonths" }] : /* istanbul ignore next */ []));
669
609
  /**
670
610
  * Defines the first of the week for various date calculations.
671
611
  * @group Props
672
612
  */
673
- get firstDayOfWeek() {
674
- return this._firstDayOfWeek;
675
- }
676
- set firstDayOfWeek(firstDayOfWeek) {
677
- this._firstDayOfWeek = firstDayOfWeek;
678
- this.createWeekDays();
679
- }
613
+ firstDayOfWeek = input(/* @ts-ignore */
614
+ ...(ngDevMode ? [undefined, { debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
680
615
  /**
681
616
  * Type of view to display, valid values are "date" for datepicker and "month" for month picker.
682
617
  * @group Props
683
618
  */
684
- get view() {
685
- return this._view;
686
- }
687
- set view(view) {
688
- this._view = view;
689
- this.currentView = this._view;
690
- }
619
+ view = input('date', /* @ts-ignore */
620
+ ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
691
621
  /**
692
622
  * Set the date to highlight on first opening if the field is blank.
693
623
  * @group Props
694
624
  */
695
- get defaultDate() {
696
- return this._defaultDate;
697
- }
698
- set defaultDate(defaultDate) {
699
- this._defaultDate = defaultDate;
700
- if (this.initialized) {
701
- const date = defaultDate || new Date();
702
- this.currentMonth = date.getMonth();
703
- this.currentYear = date.getFullYear();
704
- this.initTime(date);
705
- this.createMonths(this.currentMonth, this.currentYear);
706
- }
707
- }
625
+ defaultDate = input(/* @ts-ignore */
626
+ ...(ngDevMode ? [undefined, { debugName: "defaultDate" }] : /* istanbul ignore next */ []));
708
627
  /**
709
628
  * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
710
629
  * @defaultValue 'self'
@@ -797,56 +716,55 @@ class DatePicker extends BaseInput {
797
716
  onShow = output();
798
717
  inputfieldViewChild = viewChild('inputfield', /* @ts-ignore */
799
718
  ...(ngDevMode ? [{ debugName: "inputfieldViewChild" }] : /* istanbul ignore next */ []));
800
- set content(content) {
801
- this.contentViewChild = content;
802
- if (this.contentViewChild && this.overlay) {
803
- if (this.isMonthNavigate) {
804
- Promise.resolve(null).then(() => this.updateFocus());
805
- this.isMonthNavigate = false;
806
- }
807
- else {
808
- if (!this.focus && !this.inline) {
809
- this.initFocusableCell();
810
- }
811
- }
812
- }
813
- }
719
+ contentViewChild = viewChild('contentWrapper', /* @ts-ignore */
720
+ ...(ngDevMode ? [{ debugName: "contentViewChild" }] : /* istanbul ignore next */ []));
814
721
  _componentStyle = inject(DatePickerStyle);
815
- contentViewChild;
816
- value;
817
- dates;
818
- months;
819
- weekDays;
820
- currentMonth;
821
- currentYear;
822
- currentHour;
823
- currentMinute;
824
- currentSecond;
825
- p;
826
- pm;
827
- mask;
828
- maskClickListener;
829
- overlay;
830
- responsiveStyleElement;
831
- overlayVisible;
832
- overlayMinWidth;
722
+ value = signal(undefined, /* @ts-ignore */
723
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
724
+ months = signal(undefined, /* @ts-ignore */
725
+ ...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
726
+ weekDays = signal(undefined, /* @ts-ignore */
727
+ ...(ngDevMode ? [{ debugName: "weekDays" }] : /* istanbul ignore next */ []));
728
+ currentMonth = signal(undefined, /* @ts-ignore */
729
+ ...(ngDevMode ? [{ debugName: "currentMonth" }] : /* istanbul ignore next */ []));
730
+ currentYear = signal(undefined, /* @ts-ignore */
731
+ ...(ngDevMode ? [{ debugName: "currentYear" }] : /* istanbul ignore next */ []));
732
+ currentHour = signal(undefined, /* @ts-ignore */
733
+ ...(ngDevMode ? [{ debugName: "currentHour" }] : /* istanbul ignore next */ []));
734
+ currentMinute = signal(undefined, /* @ts-ignore */
735
+ ...(ngDevMode ? [{ debugName: "currentMinute" }] : /* istanbul ignore next */ []));
736
+ currentSecond = signal(undefined, /* @ts-ignore */
737
+ ...(ngDevMode ? [{ debugName: "currentSecond" }] : /* istanbul ignore next */ []));
738
+ pm = signal(undefined, /* @ts-ignore */
739
+ ...(ngDevMode ? [{ debugName: "pm" }] : /* istanbul ignore next */ []));
740
+ mask = signal(undefined, /* @ts-ignore */
741
+ ...(ngDevMode ? [{ debugName: "mask" }] : /* istanbul ignore next */ []));
742
+ maskClickListener = signal(undefined, /* @ts-ignore */
743
+ ...(ngDevMode ? [{ debugName: "maskClickListener" }] : /* istanbul ignore next */ []));
744
+ overlay = signal(undefined, /* @ts-ignore */
745
+ ...(ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []));
746
+ responsiveStyleElement = signal(undefined, /* @ts-ignore */
747
+ ...(ngDevMode ? [{ debugName: "responsiveStyleElement" }] : /* istanbul ignore next */ []));
748
+ overlayVisible = signal(undefined, /* @ts-ignore */
749
+ ...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
750
+ overlayMinWidth = signal(undefined, /* @ts-ignore */
751
+ ...(ngDevMode ? [{ debugName: "overlayMinWidth" }] : /* istanbul ignore next */ []));
833
752
  $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
834
753
  ...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
835
- calendarElement;
836
- timePickerTimer;
837
- documentClickListener;
838
- animationEndListener;
839
- ticksTo1970;
840
- yearOptions;
841
- focus;
842
- isKeydown;
843
- _minDate;
844
- _maxDate;
845
- _dateFormat;
846
- _hourFormat = '24';
847
- _showTime;
848
- _yearRange;
849
- preventDocumentListener;
754
+ timePickerTimer = signal(undefined, /* @ts-ignore */
755
+ ...(ngDevMode ? [{ debugName: "timePickerTimer" }] : /* istanbul ignore next */ []));
756
+ documentClickListener = signal(undefined, /* @ts-ignore */
757
+ ...(ngDevMode ? [{ debugName: "documentClickListener" }] : /* istanbul ignore next */ []));
758
+ animationEndListener = signal(undefined, /* @ts-ignore */
759
+ ...(ngDevMode ? [{ debugName: "animationEndListener" }] : /* istanbul ignore next */ []));
760
+ ticksTo1970 = signal(undefined, /* @ts-ignore */
761
+ ...(ngDevMode ? [{ debugName: "ticksTo1970" }] : /* istanbul ignore next */ []));
762
+ yearOptions = signal(undefined, /* @ts-ignore */
763
+ ...(ngDevMode ? [{ debugName: "yearOptions" }] : /* istanbul ignore next */ []));
764
+ focus = signal(undefined, /* @ts-ignore */
765
+ ...(ngDevMode ? [{ debugName: "focus" }] : /* istanbul ignore next */ []));
766
+ isKeydown = signal(undefined, /* @ts-ignore */
767
+ ...(ngDevMode ? [{ debugName: "isKeydown" }] : /* istanbul ignore next */ []));
850
768
  dayClass(date) {
851
769
  return this._componentStyle.classes.day({ instance: this, date: date });
852
770
  }
@@ -920,164 +838,230 @@ class DatePicker extends BaseInput {
920
838
  * @group Templates
921
839
  */
922
840
  buttonBarTemplate = contentChild('buttonbar', { ...(ngDevMode ? { debugName: "buttonBarTemplate" } : /* istanbul ignore next */ {}), descendants: false });
923
- _dateTemplate;
924
- _headerTemplate;
925
- _footerTemplate;
926
- _disabledDateTemplate;
927
- _decadeTemplate;
928
- _previousIconTemplate;
929
- _nextIconTemplate;
930
- _triggerIconTemplate;
931
- _clearIconTemplate;
932
- _decrementIconTemplate;
933
- _incrementIconTemplate;
934
- _inputIconTemplate;
935
- _buttonBarTemplate;
936
- _disabledDates;
937
- _disabledDays;
938
- selectElement;
939
- todayElement;
940
- focusElement;
941
- scrollHandler;
942
- documentResizeListener;
943
- navigationState = null;
944
- isMonthNavigate;
945
- initialized;
946
- translationSubscription;
947
- _locale;
948
- _responsiveOptions;
949
- currentView;
950
- attributeSelector;
951
- panelId;
952
- _numberOfMonths = 1;
953
- _firstDayOfWeek;
954
- _view = 'date';
955
- preventFocus;
956
- _defaultDate;
957
- _focusKey = null;
958
- window;
959
- get locale() {
960
- return this._locale;
961
- }
841
+ _dateTemplate = computed(() => this.templates()
842
+ .filter((item) => !['decade', 'disabledDate', 'header', 'inputicon', 'buttonbar', 'previousicon', 'nexticon', 'triggericon', 'clearicon', 'decrementicon', 'incrementicon', 'footer'].includes(item.getType()))
843
+ .at(-1)?.template, /* @ts-ignore */
844
+ ...(ngDevMode ? [{ debugName: "_dateTemplate" }] : /* istanbul ignore next */ []));
845
+ _headerTemplate = computed(() => this.templates()
846
+ .filter((item) => item.getType() === 'header')
847
+ .at(-1)?.template, /* @ts-ignore */
848
+ ...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
849
+ _footerTemplate = computed(() => this.templates()
850
+ .filter((item) => item.getType() === 'footer')
851
+ .at(-1)?.template, /* @ts-ignore */
852
+ ...(ngDevMode ? [{ debugName: "_footerTemplate" }] : /* istanbul ignore next */ []));
853
+ _disabledDateTemplate = computed(() => this.templates()
854
+ .filter((item) => item.getType() === 'disabledDate')
855
+ .at(-1)?.template, /* @ts-ignore */
856
+ ...(ngDevMode ? [{ debugName: "_disabledDateTemplate" }] : /* istanbul ignore next */ []));
857
+ _decadeTemplate = computed(() => this.templates()
858
+ .filter((item) => item.getType() === 'decade')
859
+ .at(-1)?.template, /* @ts-ignore */
860
+ ...(ngDevMode ? [{ debugName: "_decadeTemplate" }] : /* istanbul ignore next */ []));
861
+ _previousIconTemplate = computed(() => this.templates()
862
+ .filter((item) => item.getType() === 'previousicon')
863
+ .at(-1)?.template, /* @ts-ignore */
864
+ ...(ngDevMode ? [{ debugName: "_previousIconTemplate" }] : /* istanbul ignore next */ []));
865
+ _nextIconTemplate = computed(() => this.templates()
866
+ .filter((item) => item.getType() === 'nexticon')
867
+ .at(-1)?.template, /* @ts-ignore */
868
+ ...(ngDevMode ? [{ debugName: "_nextIconTemplate" }] : /* istanbul ignore next */ []));
869
+ _triggerIconTemplate = computed(() => this.templates()
870
+ .filter((item) => item.getType() === 'triggericon')
871
+ .at(-1)?.template, /* @ts-ignore */
872
+ ...(ngDevMode ? [{ debugName: "_triggerIconTemplate" }] : /* istanbul ignore next */ []));
873
+ _clearIconTemplate = computed(() => this.templates()
874
+ .filter((item) => item.getType() === 'clearicon')
875
+ .at(-1)?.template, /* @ts-ignore */
876
+ ...(ngDevMode ? [{ debugName: "_clearIconTemplate" }] : /* istanbul ignore next */ []));
877
+ _decrementIconTemplate = computed(() => this.templates()
878
+ .filter((item) => item.getType() === 'decrementicon')
879
+ .at(-1)?.template, /* @ts-ignore */
880
+ ...(ngDevMode ? [{ debugName: "_decrementIconTemplate" }] : /* istanbul ignore next */ []));
881
+ _incrementIconTemplate = computed(() => this.templates()
882
+ .filter((item) => item.getType() === 'incrementicon')
883
+ .at(-1)?.template, /* @ts-ignore */
884
+ ...(ngDevMode ? [{ debugName: "_incrementIconTemplate" }] : /* istanbul ignore next */ []));
885
+ _inputIconTemplate = computed(() => this.templates()
886
+ .filter((item) => item.getType() === 'inputicon')
887
+ .at(-1)?.template, /* @ts-ignore */
888
+ ...(ngDevMode ? [{ debugName: "_inputIconTemplate" }] : /* istanbul ignore next */ []));
889
+ _buttonBarTemplate = computed(() => this.templates()
890
+ .filter((item) => item.getType() === 'buttonbar')
891
+ .at(-1)?.template, /* @ts-ignore */
892
+ ...(ngDevMode ? [{ debugName: "_buttonBarTemplate" }] : /* istanbul ignore next */ []));
893
+ scrollHandler = signal(undefined, /* @ts-ignore */
894
+ ...(ngDevMode ? [{ debugName: "scrollHandler" }] : /* istanbul ignore next */ []));
895
+ documentResizeListener = signal(undefined, /* @ts-ignore */
896
+ ...(ngDevMode ? [{ debugName: "documentResizeListener" }] : /* istanbul ignore next */ []));
897
+ navigationState = signal(null, /* @ts-ignore */
898
+ ...(ngDevMode ? [{ debugName: "navigationState" }] : /* istanbul ignore next */ []));
899
+ isMonthNavigate = signal(undefined, /* @ts-ignore */
900
+ ...(ngDevMode ? [{ debugName: "isMonthNavigate" }] : /* istanbul ignore next */ []));
901
+ translationSubscription = signal(undefined, /* @ts-ignore */
902
+ ...(ngDevMode ? [{ debugName: "translationSubscription" }] : /* istanbul ignore next */ []));
903
+ currentView = linkedSignal(() => this.view(), /* @ts-ignore */
904
+ ...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
905
+ attributeSelector = uuid('pn_id_');
906
+ panelId = this.attributeSelector + '_panel';
907
+ preventFocus = signal(undefined, /* @ts-ignore */
908
+ ...(ngDevMode ? [{ debugName: "preventFocus" }] : /* istanbul ignore next */ []));
909
+ _focusKey = signal(null, /* @ts-ignore */
910
+ ...(ngDevMode ? [{ debugName: "_focusKey" }] : /* istanbul ignore next */ []));
911
+ window = this.document.defaultView;
962
912
  get iconButtonAriaLabel() {
963
- return this.iconAriaLabel ? this.iconAriaLabel : this.getTranslation('chooseDate');
913
+ return this.iconAriaLabel() ? this.iconAriaLabel() : this.getTranslation('chooseDate');
964
914
  }
965
915
  get prevIconAriaLabel() {
966
- return this.currentView === 'year' ? this.getTranslation('prevDecade') : this.currentView === 'month' ? this.getTranslation('prevYear') : this.getTranslation('prevMonth');
916
+ return this.currentView() === 'year' ? this.getTranslation('prevDecade') : this.currentView() === 'month' ? this.getTranslation('prevYear') : this.getTranslation('prevMonth');
967
917
  }
968
918
  get nextIconAriaLabel() {
969
- return this.currentView === 'year' ? this.getTranslation('nextDecade') : this.currentView === 'month' ? this.getTranslation('nextYear') : this.getTranslation('nextMonth');
919
+ return this.currentView() === 'year' ? this.getTranslation('nextDecade') : this.currentView() === 'month' ? this.getTranslation('nextYear') : this.getTranslation('nextMonth');
970
920
  }
971
921
  constructor() {
972
922
  super();
973
- this.window = this.document.defaultView;
923
+ let formatBound = false;
924
+ effect(() => {
925
+ this.dateFormat();
926
+ this.hourFormat();
927
+ if (formatBound) {
928
+ untracked(() => this.updateInputfield());
929
+ }
930
+ formatBound = true;
931
+ });
932
+ let restrictionsBound = false;
933
+ effect(() => {
934
+ this.minDate();
935
+ this.maxDate();
936
+ this.disabledDates();
937
+ this.disabledDays();
938
+ if (restrictionsBound) {
939
+ untracked(() => {
940
+ if (this.currentMonth() != undefined && this.currentMonth() != null && this.currentYear()) {
941
+ this.createMonths(this.currentMonth(), this.currentYear());
942
+ }
943
+ });
944
+ }
945
+ restrictionsBound = true;
946
+ });
947
+ let showTimeBound = false;
948
+ effect(() => {
949
+ const showTime = this.showTime();
950
+ if (showTimeBound || showTime !== undefined) {
951
+ untracked(() => {
952
+ if (this.currentHour() === undefined) {
953
+ this.initTime(this.value() || new Date());
954
+ }
955
+ this.updateInputfield();
956
+ });
957
+ }
958
+ showTimeBound = true;
959
+ });
960
+ let responsiveBound = false;
961
+ effect(() => {
962
+ this.responsiveOptions();
963
+ this.numberOfMonths();
964
+ if (responsiveBound) {
965
+ untracked(() => {
966
+ this.destroyResponsiveStyleElement();
967
+ this.createResponsiveStyle();
968
+ });
969
+ }
970
+ responsiveBound = true;
971
+ });
972
+ let firstDayOfWeekBound = false;
973
+ effect(() => {
974
+ const firstDayOfWeek = this.firstDayOfWeek();
975
+ if (firstDayOfWeekBound || firstDayOfWeek !== undefined) {
976
+ untracked(() => this.createWeekDays());
977
+ }
978
+ firstDayOfWeekBound = true;
979
+ });
980
+ let defaultDateBound = false;
981
+ effect(() => {
982
+ const defaultDate = this.defaultDate();
983
+ if (defaultDateBound) {
984
+ untracked(() => {
985
+ const date = defaultDate || new Date();
986
+ this.currentMonth.set(date.getMonth());
987
+ this.currentYear.set(date.getFullYear());
988
+ this.initTime(date);
989
+ this.createMonths(this.currentMonth(), this.currentYear());
990
+ });
991
+ }
992
+ defaultDateBound = true;
993
+ });
994
+ effect(() => {
995
+ const contentViewChild = this.contentViewChild();
996
+ untracked(() => {
997
+ if (contentViewChild && this.overlay()) {
998
+ if (this.isMonthNavigate()) {
999
+ Promise.resolve(null).then(() => this.updateFocus());
1000
+ this.isMonthNavigate.set(false);
1001
+ }
1002
+ else {
1003
+ if (!this.focus() && !this.inline()) {
1004
+ this.initFocusableCell();
1005
+ }
1006
+ }
1007
+ }
1008
+ });
1009
+ });
1010
+ afterNextRender(() => {
1011
+ if (this.inline()) {
1012
+ this.contentViewChild() && this.contentViewChild().nativeElement.setAttribute(this.attributeSelector, '');
1013
+ }
1014
+ else {
1015
+ if (!this.$disabled() && this.overlay()) {
1016
+ this.initFocusableCell();
1017
+ if (this.numberOfMonths() === 1) {
1018
+ if (this.contentViewChild() && this.contentViewChild().nativeElement) {
1019
+ this.contentViewChild().nativeElement.style.width = getOuterWidth(this.el?.nativeElement) + 'px';
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ });
1025
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
974
1026
  }
975
1027
  onInit() {
976
- this.attributeSelector = uuid('pn_id_');
977
- this.panelId = this.attributeSelector + '_panel';
978
- const date = this.defaultDate || new Date();
1028
+ const date = this.defaultDate() || new Date();
979
1029
  this.createResponsiveStyle();
980
- this.currentMonth = date.getMonth();
981
- this.currentYear = date.getFullYear();
982
- this.yearOptions = [];
983
- this.currentView = this.view;
984
- if (this.view === 'date') {
1030
+ this.currentMonth.set(date.getMonth());
1031
+ this.currentYear.set(date.getFullYear());
1032
+ this.yearOptions.set([]);
1033
+ if (this.view() === 'date') {
985
1034
  this.createWeekDays();
986
1035
  this.initTime(date);
987
- this.createMonths(this.currentMonth, this.currentYear);
988
- this.ticksTo1970 = ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000;
1036
+ this.createMonths(this.currentMonth(), this.currentYear());
1037
+ this.ticksTo1970.set(((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000);
989
1038
  }
990
- this.translationSubscription = this.config.translationObserver.subscribe(() => {
1039
+ this.translationSubscription.set(this.config.translationObserver.subscribe(() => {
991
1040
  this.createWeekDays();
992
1041
  this.cd.markForCheck();
993
- });
994
- this.initialized = true;
995
- }
996
- onAfterViewInit() {
997
- if (this.inline) {
998
- this.contentViewChild && this.contentViewChild.nativeElement.setAttribute(this.attributeSelector, '');
999
- }
1000
- else {
1001
- if (!this.$disabled() && this.overlay) {
1002
- this.initFocusableCell();
1003
- if (this.numberOfMonths === 1) {
1004
- if (this.contentViewChild && this.contentViewChild.nativeElement) {
1005
- this.contentViewChild.nativeElement.style.width = getOuterWidth(this.el?.nativeElement) + 'px';
1006
- }
1007
- }
1008
- }
1009
- }
1010
- }
1011
- onAfterViewChecked() {
1012
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1042
+ }));
1013
1043
  }
1014
1044
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
1015
1045
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
1016
- onAfterContentInit() {
1017
- this.templates().forEach((item) => {
1018
- switch (item.getType()) {
1019
- case 'date':
1020
- this._dateTemplate = item.template;
1021
- break;
1022
- case 'decade':
1023
- this._decadeTemplate = item.template;
1024
- break;
1025
- case 'disabledDate':
1026
- this._disabledDateTemplate = item.template;
1027
- break;
1028
- case 'header':
1029
- this._headerTemplate = item.template;
1030
- break;
1031
- case 'inputicon':
1032
- this._inputIconTemplate = item.template;
1033
- break;
1034
- case 'buttonbar':
1035
- this._buttonBarTemplate = item.template;
1036
- break;
1037
- case 'previousicon':
1038
- this._previousIconTemplate = item.template;
1039
- break;
1040
- case 'nexticon':
1041
- this._nextIconTemplate = item.template;
1042
- break;
1043
- case 'triggericon':
1044
- this._triggerIconTemplate = item.template;
1045
- break;
1046
- case 'clearicon':
1047
- this._clearIconTemplate = item.template;
1048
- break;
1049
- case 'decrementicon':
1050
- this._decrementIconTemplate = item.template;
1051
- break;
1052
- case 'incrementicon':
1053
- this._incrementIconTemplate = item.template;
1054
- break;
1055
- case 'footer':
1056
- this._footerTemplate = item.template;
1057
- break;
1058
- default:
1059
- this._dateTemplate = item.template;
1060
- break;
1061
- }
1062
- });
1063
- }
1064
1046
  getTranslation(option) {
1065
1047
  return this.config.getTranslation(option);
1066
1048
  }
1067
1049
  populateYearOptions(start, end) {
1068
- this.yearOptions = [];
1050
+ const yearOptions = [];
1069
1051
  for (let i = start; i <= end; i++) {
1070
- this.yearOptions.push(i);
1052
+ yearOptions.push(i);
1071
1053
  }
1054
+ this.yearOptions.set(yearOptions);
1072
1055
  }
1073
1056
  createWeekDays() {
1074
- this.weekDays = [];
1057
+ const weekDays = [];
1075
1058
  let dayIndex = this.getFirstDateOfWeek();
1076
1059
  let dayLabels = this.getTranslation(TranslationKeys.DAY_NAMES_MIN);
1077
1060
  for (let i = 0; i < 7; i++) {
1078
- this.weekDays.push(dayLabels[dayIndex]);
1061
+ weekDays.push(dayLabels[dayIndex]);
1079
1062
  dayIndex = dayIndex == 6 ? 0 : ++dayIndex;
1080
1063
  }
1064
+ this.weekDays.set(weekDays);
1081
1065
  }
1082
1066
  monthPickerValues() {
1083
1067
  let monthPickerValues = [];
@@ -1086,29 +1070,31 @@ class DatePicker extends BaseInput {
1086
1070
  }
1087
1071
  return monthPickerValues;
1088
1072
  }
1089
- yearPickerValues() {
1073
+ yearPickerValues = computed(() => {
1090
1074
  let yearPickerValues = [];
1091
- let base = this.currentYear - (this.currentYear % 10);
1075
+ let base = this.currentYear() - (this.currentYear() % 10);
1092
1076
  for (let i = 0; i < 10; i++) {
1093
1077
  yearPickerValues.push(base + i);
1094
1078
  }
1095
1079
  return yearPickerValues;
1096
- }
1080
+ }, /* @ts-ignore */
1081
+ ...(ngDevMode ? [{ debugName: "yearPickerValues" }] : /* istanbul ignore next */ []));
1097
1082
  createMonths(month, year) {
1098
- this.months = this.months = [];
1099
- for (let i = 0; i < this.numberOfMonths; i++) {
1083
+ const months = [];
1084
+ for (let i = 0; i < this.numberOfMonths(); i++) {
1100
1085
  let m = month + i;
1101
1086
  let y = year;
1102
1087
  if (m > 11) {
1103
1088
  m = m % 12;
1104
1089
  y = year + Math.floor((month + i) / 12);
1105
1090
  }
1106
- this.months.push(this.createMonth(m, y));
1091
+ months.push(this.createMonth(m, y));
1107
1092
  }
1093
+ this.months.set(months);
1108
1094
  }
1109
1095
  getWeekNumber(date) {
1110
1096
  let checkDate = new Date(date.getTime());
1111
- if (this.startWeekFromFirstDayOfYear) {
1097
+ if (this.startWeekFromFirstDayOfYear()) {
1112
1098
  let firstDayOfWeek = +this.getFirstDateOfWeek();
1113
1099
  checkDate.setDate(checkDate.getDate() + 6 + firstDayOfWeek - checkDate.getDay());
1114
1100
  }
@@ -1180,7 +1166,7 @@ class DatePicker extends BaseInput {
1180
1166
  dayNo++;
1181
1167
  }
1182
1168
  }
1183
- if (this.showWeek) {
1169
+ if (this.showWeek()) {
1184
1170
  weekNumbers.push(this.getWeekNumber(new Date(week[0].year, week[0].month, week[0].day)));
1185
1171
  }
1186
1172
  dates.push(week);
@@ -1193,16 +1179,16 @@ class DatePicker extends BaseInput {
1193
1179
  };
1194
1180
  }
1195
1181
  initTime(date) {
1196
- this.pm = date.getHours() > 11;
1197
- if (this.showTime) {
1198
- this.currentMinute = date.getMinutes();
1199
- this.currentSecond = this.showSeconds ? date.getSeconds() : 0;
1182
+ this.pm.set(date.getHours() > 11);
1183
+ if (this.showTime()) {
1184
+ this.currentMinute.set(date.getMinutes());
1185
+ this.currentSecond.set(this.showSeconds() ? date.getSeconds() : 0);
1200
1186
  this.setCurrentHourPM(date.getHours());
1201
1187
  }
1202
- else if (this.timeOnly) {
1203
- this.currentMinute = 0;
1204
- this.currentHour = 0;
1205
- this.currentSecond = 0;
1188
+ else if (this.timeOnly()) {
1189
+ this.currentMinute.set(0);
1190
+ this.currentHour.set(0);
1191
+ this.currentSecond.set(0);
1206
1192
  }
1207
1193
  }
1208
1194
  navBackward(event) {
@@ -1210,29 +1196,29 @@ class DatePicker extends BaseInput {
1210
1196
  event.preventDefault();
1211
1197
  return;
1212
1198
  }
1213
- this.isMonthNavigate = true;
1214
- if (this.currentView === 'month') {
1199
+ this.isMonthNavigate.set(true);
1200
+ if (this.currentView() === 'month') {
1215
1201
  this.decrementYear();
1216
1202
  setTimeout(() => {
1217
1203
  this.updateFocus();
1218
1204
  }, 1);
1219
1205
  }
1220
- else if (this.currentView === 'year') {
1206
+ else if (this.currentView() === 'year') {
1221
1207
  this.decrementDecade();
1222
1208
  setTimeout(() => {
1223
1209
  this.updateFocus();
1224
1210
  }, 1);
1225
1211
  }
1226
1212
  else {
1227
- if (this.currentMonth === 0) {
1228
- this.currentMonth = 11;
1213
+ if (this.currentMonth() === 0) {
1214
+ this.currentMonth.set(11);
1229
1215
  this.decrementYear();
1230
1216
  }
1231
1217
  else {
1232
- this.currentMonth--;
1218
+ this.currentMonth.update((v) => v - 1);
1233
1219
  }
1234
- this.onMonthChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
1235
- this.createMonths(this.currentMonth, this.currentYear);
1220
+ this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
1221
+ this.createMonths(this.currentMonth(), this.currentYear());
1236
1222
  }
1237
1223
  }
1238
1224
  navForward(event) {
@@ -1240,49 +1226,49 @@ class DatePicker extends BaseInput {
1240
1226
  event.preventDefault();
1241
1227
  return;
1242
1228
  }
1243
- this.isMonthNavigate = true;
1244
- if (this.currentView === 'month') {
1229
+ this.isMonthNavigate.set(true);
1230
+ if (this.currentView() === 'month') {
1245
1231
  this.incrementYear();
1246
1232
  setTimeout(() => {
1247
1233
  this.updateFocus();
1248
1234
  }, 1);
1249
1235
  }
1250
- else if (this.currentView === 'year') {
1236
+ else if (this.currentView() === 'year') {
1251
1237
  this.incrementDecade();
1252
1238
  setTimeout(() => {
1253
1239
  this.updateFocus();
1254
1240
  }, 1);
1255
1241
  }
1256
1242
  else {
1257
- if (this.currentMonth === 11) {
1258
- this.currentMonth = 0;
1243
+ if (this.currentMonth() === 11) {
1244
+ this.currentMonth.set(0);
1259
1245
  this.incrementYear();
1260
1246
  }
1261
1247
  else {
1262
- this.currentMonth++;
1248
+ this.currentMonth.update((v) => v + 1);
1263
1249
  }
1264
- this.onMonthChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
1265
- this.createMonths(this.currentMonth, this.currentYear);
1250
+ this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
1251
+ this.createMonths(this.currentMonth(), this.currentYear());
1266
1252
  }
1267
1253
  }
1268
1254
  decrementYear() {
1269
- this.currentYear--;
1270
- let _yearOptions = this.yearOptions;
1271
- if (this.currentYear < _yearOptions[0]) {
1255
+ this.currentYear.update((v) => v - 1);
1256
+ let _yearOptions = this.yearOptions();
1257
+ if (this.currentYear() < _yearOptions[0]) {
1272
1258
  let difference = _yearOptions[_yearOptions.length - 1] - _yearOptions[0];
1273
1259
  this.populateYearOptions(_yearOptions[0] - difference, _yearOptions[_yearOptions.length - 1] - difference);
1274
1260
  }
1275
1261
  }
1276
1262
  decrementDecade() {
1277
- this.currentYear = this.currentYear - 10;
1263
+ this.currentYear.set(this.currentYear() - 10);
1278
1264
  }
1279
1265
  incrementDecade() {
1280
- this.currentYear = this.currentYear + 10;
1266
+ this.currentYear.set(this.currentYear() + 10);
1281
1267
  }
1282
1268
  incrementYear() {
1283
- this.currentYear++;
1284
- let _yearOptions = this.yearOptions;
1285
- if (this.currentYear > _yearOptions[_yearOptions.length - 1]) {
1269
+ this.currentYear.update((v) => v + 1);
1270
+ let _yearOptions = this.yearOptions();
1271
+ if (this.currentYear() > _yearOptions[_yearOptions.length - 1]) {
1286
1272
  let difference = _yearOptions[_yearOptions.length - 1] - _yearOptions[0];
1287
1273
  this.populateYearOptions(_yearOptions[0] + difference, _yearOptions[_yearOptions.length - 1] + difference);
1288
1274
  }
@@ -1301,27 +1287,26 @@ class DatePicker extends BaseInput {
1301
1287
  return;
1302
1288
  }
1303
1289
  if (this.isMultipleSelection() && this.isSelected(dateMeta)) {
1304
- this.value = this.value.filter((date, i) => {
1290
+ this.value.set(this.value().filter((date, i) => {
1305
1291
  return !this.isDateEquals(date, dateMeta);
1306
- });
1307
- if (this.value.length === 0) {
1308
- this.value = null;
1292
+ }));
1293
+ if (this.value().length === 0) {
1294
+ this.value.set(null);
1309
1295
  }
1310
- this.updateModel(this.value);
1296
+ this.updateModel(this.value());
1311
1297
  }
1312
1298
  else {
1313
1299
  if (this.shouldSelectDate(dateMeta)) {
1314
1300
  this.selectDate(dateMeta);
1315
1301
  }
1316
1302
  }
1317
- if (this.hideOnDateTimeSelect && (this.isSingleSelection() || (this.isRangeSelection() && this.value[1]))) {
1303
+ if (this.hideOnDateTimeSelect() && (this.isSingleSelection() || (this.isRangeSelection() && this.value()[1]))) {
1318
1304
  setTimeout(() => {
1319
1305
  event.preventDefault();
1320
1306
  this.hideOverlay();
1321
- if (this.mask) {
1307
+ if (this.mask()) {
1322
1308
  this.disableModality();
1323
1309
  }
1324
- this.cd.markForCheck();
1325
1310
  }, 150);
1326
1311
  }
1327
1312
  this.updateInputfield();
@@ -1329,80 +1314,81 @@ class DatePicker extends BaseInput {
1329
1314
  }
1330
1315
  shouldSelectDate(dateMeta) {
1331
1316
  if (this.isMultipleSelection())
1332
- return this.maxDateCount != null ? this.maxDateCount > (this.value ? this.value.length : 0) : true;
1317
+ return this.maxDateCount() != null ? this.maxDateCount() > (this.value() ? this.value().length : 0) : true;
1333
1318
  else
1334
1319
  return true;
1335
1320
  }
1336
1321
  onMonthSelect(event, index) {
1337
- if (this.view === 'month') {
1338
- this.onDateSelect(event, { year: this.currentYear, month: index, day: 1, selectable: true });
1322
+ if (this.view() === 'month') {
1323
+ this.onDateSelect(event, { year: this.currentYear(), month: index, day: 1, selectable: true });
1339
1324
  }
1340
1325
  else {
1341
- this.currentMonth = index;
1342
- this.createMonths(this.currentMonth, this.currentYear);
1326
+ this.currentMonth.set(index);
1327
+ this.createMonths(this.currentMonth(), this.currentYear());
1343
1328
  this.setCurrentView('date');
1344
- this.onMonthChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
1329
+ this.onMonthChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
1345
1330
  }
1346
1331
  }
1347
1332
  onYearSelect(event, year) {
1348
- if (this.view === 'year') {
1333
+ if (this.view() === 'year') {
1349
1334
  this.onDateSelect(event, { year: year, month: 0, day: 1, selectable: true });
1350
1335
  }
1351
1336
  else {
1352
- this.currentYear = year;
1337
+ this.currentYear.set(year);
1353
1338
  this.setCurrentView('month');
1354
- this.onYearChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
1339
+ this.onYearChange.emit({ month: this.currentMonth() + 1, year: this.currentYear() });
1355
1340
  }
1356
1341
  }
1357
1342
  updateInputfield() {
1358
1343
  let formattedValue = '';
1359
- if (this.value) {
1344
+ if (this.value()) {
1360
1345
  if (this.isSingleSelection()) {
1361
- formattedValue = this.formatDateTime(this.value);
1346
+ formattedValue = this.formatDateTime(this.value());
1362
1347
  }
1363
1348
  else if (this.isMultipleSelection()) {
1364
- for (let i = 0; i < this.value.length; i++) {
1365
- let dateAsString = this.formatDateTime(this.value[i]);
1349
+ for (let i = 0; i < this.value().length; i++) {
1350
+ let dateAsString = this.formatDateTime(this.value()[i]);
1366
1351
  formattedValue += dateAsString;
1367
- if (i !== this.value.length - 1) {
1368
- formattedValue += this.multipleSeparator + ' ';
1352
+ if (i !== this.value().length - 1) {
1353
+ formattedValue += this.multipleSeparator() + ' ';
1369
1354
  }
1370
1355
  }
1371
1356
  }
1372
1357
  else if (this.isRangeSelection()) {
1373
- if (this.value && this.value.length) {
1374
- let startDate = this.value[0];
1375
- let endDate = this.value[1];
1358
+ if (this.value() && this.value().length) {
1359
+ let startDate = this.value()[0];
1360
+ let endDate = this.value()[1];
1376
1361
  formattedValue = this.formatDateTime(startDate);
1377
1362
  if (endDate) {
1378
- formattedValue += ' ' + this.rangeSeparator + ' ' + this.formatDateTime(endDate);
1363
+ formattedValue += ' ' + this.rangeSeparator() + ' ' + this.formatDateTime(endDate);
1379
1364
  }
1380
1365
  }
1381
1366
  }
1382
1367
  }
1383
1368
  this.writeModelValue(formattedValue);
1384
- this.inputFieldValue = formattedValue;
1369
+ this.inputFieldValue.set(formattedValue);
1385
1370
  const inputfieldViewChild = this.inputfieldViewChild();
1386
1371
  if (inputfieldViewChild && inputfieldViewChild.nativeElement) {
1387
- inputfieldViewChild.nativeElement.value = this.inputFieldValue;
1372
+ inputfieldViewChild.nativeElement.value = this.inputFieldValue();
1388
1373
  }
1389
1374
  }
1390
- inputFieldValue = null;
1375
+ inputFieldValue = signal(null, /* @ts-ignore */
1376
+ ...(ngDevMode ? [{ debugName: "inputFieldValue" }] : /* istanbul ignore next */ []));
1391
1377
  formatDateTime(date) {
1392
- let formattedValue = this.keepInvalid ? date : null;
1378
+ let formattedValue = this.keepInvalid() ? date : null;
1393
1379
  const isDateValid = this.isValidDateForTimeConstraints(date);
1394
1380
  if (this.isValidDate(date)) {
1395
- if (this.timeOnly) {
1381
+ if (this.timeOnly()) {
1396
1382
  formattedValue = this.formatTime(date);
1397
1383
  }
1398
1384
  else {
1399
1385
  formattedValue = this.formatDate(date, this.getDateFormat());
1400
- if (this.showTime) {
1386
+ if (this.showTime()) {
1401
1387
  formattedValue += ' ' + this.formatTime(date);
1402
1388
  }
1403
1389
  }
1404
1390
  }
1405
- else if (this.dataType === 'string') {
1391
+ else if (this.dataType() === 'string') {
1406
1392
  formattedValue = date;
1407
1393
  }
1408
1394
  formattedValue = isDateValid ? formattedValue : '';
@@ -1415,61 +1401,61 @@ class DatePicker extends BaseInput {
1415
1401
  return `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
1416
1402
  }
1417
1403
  setCurrentHourPM(hours) {
1418
- if (this.hourFormat == '12') {
1419
- this.pm = hours > 11;
1404
+ if (this.hourFormat() == '12') {
1405
+ this.pm.set(hours > 11);
1420
1406
  if (hours >= 12) {
1421
- this.currentHour = hours == 12 ? 12 : hours - 12;
1407
+ this.currentHour.set(hours == 12 ? 12 : hours - 12);
1422
1408
  }
1423
1409
  else {
1424
- this.currentHour = hours == 0 ? 12 : hours;
1410
+ this.currentHour.set(hours == 0 ? 12 : hours);
1425
1411
  }
1426
1412
  }
1427
1413
  else {
1428
- this.currentHour = hours;
1414
+ this.currentHour.set(hours);
1429
1415
  }
1430
1416
  }
1431
1417
  setCurrentView(currentView) {
1432
- this.currentView = currentView;
1418
+ this.currentView.set(currentView);
1433
1419
  this.cd.detectChanges();
1434
1420
  this.alignOverlay();
1435
1421
  }
1436
1422
  selectDate(dateMeta) {
1437
1423
  let date = this.formatDateMetaToDate(dateMeta);
1438
- if (this.showTime) {
1439
- if (this.hourFormat == '12') {
1440
- if (this.currentHour === 12)
1441
- date.setHours(this.pm ? 12 : 0);
1424
+ if (this.showTime()) {
1425
+ if (this.hourFormat() == '12') {
1426
+ if (this.currentHour() === 12)
1427
+ date.setHours(this.pm() ? 12 : 0);
1442
1428
  else
1443
- date.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
1429
+ date.setHours(this.pm() ? this.currentHour() + 12 : this.currentHour());
1444
1430
  }
1445
1431
  else {
1446
- date.setHours(this.currentHour);
1432
+ date.setHours(this.currentHour());
1447
1433
  }
1448
- date.setMinutes(this.currentMinute);
1449
- date.setSeconds(this.currentSecond);
1434
+ date.setMinutes(this.currentMinute());
1435
+ date.setSeconds(this.currentSecond());
1450
1436
  }
1451
- if (this.minDate && this.minDate > date) {
1452
- date = this.minDate;
1437
+ if (this.minDate() && this.minDate() > date) {
1438
+ date = this.minDate();
1453
1439
  this.setCurrentHourPM(date.getHours());
1454
- this.currentMinute = date.getMinutes();
1455
- this.currentSecond = date.getSeconds();
1440
+ this.currentMinute.set(date.getMinutes());
1441
+ this.currentSecond.set(date.getSeconds());
1456
1442
  }
1457
- if (this.maxDate && this.maxDate < date) {
1458
- date = this.maxDate;
1443
+ if (this.maxDate() && this.maxDate() < date) {
1444
+ date = this.maxDate();
1459
1445
  this.setCurrentHourPM(date.getHours());
1460
- this.currentMinute = date.getMinutes();
1461
- this.currentSecond = date.getSeconds();
1446
+ this.currentMinute.set(date.getMinutes());
1447
+ this.currentSecond.set(date.getSeconds());
1462
1448
  }
1463
1449
  if (this.isSingleSelection()) {
1464
1450
  this.updateModel(date);
1465
1451
  }
1466
1452
  else if (this.isMultipleSelection()) {
1467
- this.updateModel(this.value ? [...this.value, date] : [date]);
1453
+ this.updateModel(this.value() ? [...this.value(), date] : [date]);
1468
1454
  }
1469
1455
  else if (this.isRangeSelection()) {
1470
- if (this.value && this.value.length) {
1471
- let startDate = this.value[0];
1472
- let endDate = this.value[1];
1456
+ if (this.value() && this.value().length) {
1457
+ let startDate = this.value()[0];
1458
+ let endDate = this.value()[1];
1473
1459
  if (!endDate && date.getTime() >= startDate.getTime()) {
1474
1460
  endDate = date;
1475
1461
  }
@@ -1486,19 +1472,19 @@ class DatePicker extends BaseInput {
1486
1472
  this.onSelect.emit(date);
1487
1473
  }
1488
1474
  updateModel(value) {
1489
- this.value = value;
1490
- if (this.dataType == 'date') {
1491
- this.writeModelValue(this.value);
1492
- this.onModelChange(this.value);
1475
+ this.value.set(value);
1476
+ if (this.dataType() == 'date') {
1477
+ this.writeModelValue(this.value());
1478
+ this.onModelChange(this.value());
1493
1479
  }
1494
- else if (this.dataType == 'string') {
1480
+ else if (this.dataType() == 'string') {
1495
1481
  if (this.isSingleSelection()) {
1496
- this.onModelChange(this.formatDateTime(this.value));
1482
+ this.onModelChange(this.formatDateTime(this.value()));
1497
1483
  }
1498
1484
  else {
1499
1485
  let stringArrValue = null;
1500
- if (Array.isArray(this.value)) {
1501
- stringArrValue = this.value.map((date) => this.formatDateTime(date));
1486
+ if (Array.isArray(this.value())) {
1487
+ stringArrValue = this.value().map((date) => this.formatDateTime(date));
1502
1488
  }
1503
1489
  this.writeModelValue(stringArrValue);
1504
1490
  this.onModelChange(stringArrValue);
@@ -1549,13 +1535,13 @@ class DatePicker extends BaseInput {
1549
1535
  return firstDayOfWeek > 0 ? 7 - firstDayOfWeek : 0;
1550
1536
  }
1551
1537
  isSelected(dateMeta) {
1552
- if (this.value) {
1538
+ if (this.value()) {
1553
1539
  if (this.isSingleSelection()) {
1554
- return this.isDateEquals(this.value, dateMeta);
1540
+ return this.isDateEquals(this.value(), dateMeta);
1555
1541
  }
1556
1542
  else if (this.isMultipleSelection()) {
1557
1543
  let selected = false;
1558
- for (let date of this.value) {
1544
+ for (let date of this.value()) {
1559
1545
  selected = this.isDateEquals(date, dateMeta);
1560
1546
  if (selected) {
1561
1547
  break;
@@ -1564,42 +1550,43 @@ class DatePicker extends BaseInput {
1564
1550
  return selected;
1565
1551
  }
1566
1552
  else if (this.isRangeSelection()) {
1567
- if (this.value[1])
1568
- return this.isDateEquals(this.value[0], dateMeta) || this.isDateEquals(this.value[1], dateMeta) || this.isDateBetween(this.value[0], this.value[1], dateMeta);
1553
+ if (this.value()[1])
1554
+ return this.isDateEquals(this.value()[0], dateMeta) || this.isDateEquals(this.value()[1], dateMeta) || this.isDateBetween(this.value()[0], this.value()[1], dateMeta);
1569
1555
  else
1570
- return this.isDateEquals(this.value[0], dateMeta);
1556
+ return this.isDateEquals(this.value()[0], dateMeta);
1571
1557
  }
1572
1558
  }
1573
1559
  else {
1574
1560
  return false;
1575
1561
  }
1576
1562
  }
1577
- isComparable() {
1578
- return this.value != null && typeof this.value !== 'string';
1579
- }
1563
+ isComparable = computed(() => {
1564
+ return this.value() != null && typeof this.value() !== 'string';
1565
+ }, /* @ts-ignore */
1566
+ ...(ngDevMode ? [{ debugName: "isComparable" }] : /* istanbul ignore next */ []));
1580
1567
  isMonthSelected(month) {
1581
1568
  if (!this.isComparable())
1582
1569
  return false;
1583
1570
  if (this.isMultipleSelection()) {
1584
- return this.value.some((currentValue) => currentValue.getMonth() === month && currentValue.getFullYear() === this.currentYear);
1571
+ return this.value().some((currentValue) => currentValue.getMonth() === month && currentValue.getFullYear() === this.currentYear());
1585
1572
  }
1586
1573
  else if (this.isRangeSelection()) {
1587
- if (!this.value[1]) {
1588
- return this.value[0]?.getFullYear() === this.currentYear && this.value[0]?.getMonth() === month;
1574
+ if (!this.value()[1]) {
1575
+ return this.value()[0]?.getFullYear() === this.currentYear() && this.value()[0]?.getMonth() === month;
1589
1576
  }
1590
1577
  else {
1591
- const currentDate = new Date(this.currentYear, month, 1);
1592
- const startDate = new Date(this.value[0].getFullYear(), this.value[0].getMonth(), 1);
1593
- const endDate = new Date(this.value[1].getFullYear(), this.value[1].getMonth(), 1);
1578
+ const currentDate = new Date(this.currentYear(), month, 1);
1579
+ const startDate = new Date(this.value()[0].getFullYear(), this.value()[0].getMonth(), 1);
1580
+ const endDate = new Date(this.value()[1].getFullYear(), this.value()[1].getMonth(), 1);
1594
1581
  return currentDate >= startDate && currentDate <= endDate;
1595
1582
  }
1596
1583
  }
1597
1584
  else {
1598
- return this.value.getMonth() === month && this.value.getFullYear() === this.currentYear;
1585
+ return this.value().getMonth() === month && this.value().getFullYear() === this.currentYear();
1599
1586
  }
1600
1587
  }
1601
1588
  isMonthDisabled(month, year) {
1602
- const yearToCheck = year ?? this.currentYear;
1589
+ const yearToCheck = year ?? this.currentYear();
1603
1590
  for (let day = 1; day < this.getDaysCountInMonth(month, yearToCheck) + 1; day++) {
1604
1591
  if (this.isSelectable(day, month, yearToCheck, false)) {
1605
1592
  return false;
@@ -1614,7 +1601,7 @@ class DatePicker extends BaseInput {
1614
1601
  }
1615
1602
  isYearSelected(year) {
1616
1603
  if (this.isComparable()) {
1617
- let value = this.isRangeSelection() ? this.value[0] : this.value;
1604
+ let value = this.isRangeSelection() ? this.value()[0] : this.value();
1618
1605
  return !this.isMultipleSelection() ? value.getFullYear() === year : false;
1619
1606
  }
1620
1607
  return false;
@@ -1633,15 +1620,18 @@ class DatePicker extends BaseInput {
1633
1620
  }
1634
1621
  return between;
1635
1622
  }
1636
- isSingleSelection() {
1637
- return this.selectionMode === 'single';
1638
- }
1639
- isRangeSelection() {
1640
- return this.selectionMode === 'range';
1641
- }
1642
- isMultipleSelection() {
1643
- return this.selectionMode === 'multiple';
1644
- }
1623
+ isSingleSelection = computed(() => {
1624
+ return this.selectionMode() === 'single';
1625
+ }, /* @ts-ignore */
1626
+ ...(ngDevMode ? [{ debugName: "isSingleSelection" }] : /* istanbul ignore next */ []));
1627
+ isRangeSelection = computed(() => {
1628
+ return this.selectionMode() === 'range';
1629
+ }, /* @ts-ignore */
1630
+ ...(ngDevMode ? [{ debugName: "isRangeSelection" }] : /* istanbul ignore next */ []));
1631
+ isMultipleSelection = computed(() => {
1632
+ return this.selectionMode() === 'multiple';
1633
+ }, /* @ts-ignore */
1634
+ ...(ngDevMode ? [{ debugName: "isMultipleSelection" }] : /* istanbul ignore next */ []));
1645
1635
  isToday(today, day, month, year) {
1646
1636
  return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;
1647
1637
  }
@@ -1650,50 +1640,50 @@ class DatePicker extends BaseInput {
1650
1640
  let validMax = true;
1651
1641
  let validDate = true;
1652
1642
  let validDay = true;
1653
- if (otherMonth && !this.selectOtherMonths) {
1643
+ if (otherMonth && !this.selectOtherMonths()) {
1654
1644
  return false;
1655
1645
  }
1656
- if (this.minDate) {
1657
- if (this.minDate.getFullYear() > year) {
1646
+ if (this.minDate()) {
1647
+ if (this.minDate().getFullYear() > year) {
1658
1648
  validMin = false;
1659
1649
  }
1660
- else if (this.minDate.getFullYear() === year && this.currentView != 'year') {
1661
- if (this.minDate.getMonth() > month) {
1650
+ else if (this.minDate().getFullYear() === year && this.currentView() != 'year') {
1651
+ if (this.minDate().getMonth() > month) {
1662
1652
  validMin = false;
1663
1653
  }
1664
- else if (this.minDate.getMonth() === month) {
1665
- if (this.minDate.getDate() > day) {
1654
+ else if (this.minDate().getMonth() === month) {
1655
+ if (this.minDate().getDate() > day) {
1666
1656
  validMin = false;
1667
1657
  }
1668
1658
  }
1669
1659
  }
1670
1660
  }
1671
- if (this.maxDate) {
1672
- if (this.maxDate.getFullYear() < year) {
1661
+ if (this.maxDate()) {
1662
+ if (this.maxDate().getFullYear() < year) {
1673
1663
  validMax = false;
1674
1664
  }
1675
- else if (this.maxDate.getFullYear() === year) {
1676
- if (this.maxDate.getMonth() < month) {
1665
+ else if (this.maxDate().getFullYear() === year) {
1666
+ if (this.maxDate().getMonth() < month) {
1677
1667
  validMax = false;
1678
1668
  }
1679
- else if (this.maxDate.getMonth() === month) {
1680
- if (this.maxDate.getDate() < day) {
1669
+ else if (this.maxDate().getMonth() === month) {
1670
+ if (this.maxDate().getDate() < day) {
1681
1671
  validMax = false;
1682
1672
  }
1683
1673
  }
1684
1674
  }
1685
1675
  }
1686
- if (this.disabledDates) {
1676
+ if (this.disabledDates()) {
1687
1677
  validDate = !this.isDateDisabled(day, month, year);
1688
1678
  }
1689
- if (this.disabledDays) {
1679
+ if (this.disabledDays()) {
1690
1680
  validDay = !this.isDayDisabled(day, month, year);
1691
1681
  }
1692
1682
  return validMin && validMax && validDate && validDay;
1693
1683
  }
1694
1684
  isDateDisabled(day, month, year) {
1695
- if (this.disabledDates) {
1696
- for (let disabledDate of this.disabledDates) {
1685
+ if (this.disabledDates()) {
1686
+ for (let disabledDate of this.disabledDates()) {
1697
1687
  if (disabledDate.getFullYear() === year && disabledDate.getMonth() === month && disabledDate.getDate() === day) {
1698
1688
  return true;
1699
1689
  }
@@ -1702,29 +1692,29 @@ class DatePicker extends BaseInput {
1702
1692
  return false;
1703
1693
  }
1704
1694
  isDayDisabled(day, month, year) {
1705
- if (this.disabledDays) {
1695
+ if (this.disabledDays()) {
1706
1696
  let weekday = new Date(year, month, day);
1707
1697
  let weekdayNumber = weekday.getDay();
1708
- return this.disabledDays.indexOf(weekdayNumber) !== -1;
1698
+ return this.disabledDays().indexOf(weekdayNumber) !== -1;
1709
1699
  }
1710
1700
  return false;
1711
1701
  }
1712
1702
  onInputFocus(event) {
1713
- this.focus = true;
1714
- if (this.showOnFocus) {
1703
+ this.focus.set(true);
1704
+ if (this.showOnFocus()) {
1715
1705
  this.showOverlay();
1716
1706
  }
1717
1707
  this.onFocus.emit(event);
1718
1708
  }
1719
1709
  onInputClick() {
1720
- if (this.showOnFocus && !this.overlayVisible) {
1710
+ if (this.showOnFocus() && !this.overlayVisible()) {
1721
1711
  this.showOverlay();
1722
1712
  }
1723
1713
  }
1724
1714
  onInputBlur(event) {
1725
- this.focus = false;
1715
+ this.focus.set(false);
1726
1716
  this.onBlur.emit(event);
1727
- if (!this.keepInvalid) {
1717
+ if (!this.keepInvalid()) {
1728
1718
  this.updateInputfield();
1729
1719
  }
1730
1720
  this.onModelTouched();
@@ -1733,7 +1723,7 @@ class DatePicker extends BaseInput {
1733
1723
  if (this.$disabled()) {
1734
1724
  return;
1735
1725
  }
1736
- if (!this.overlayVisible) {
1726
+ if (!this.overlayVisible()) {
1737
1727
  inputfield.focus();
1738
1728
  this.showOverlay();
1739
1729
  }
@@ -1742,10 +1732,10 @@ class DatePicker extends BaseInput {
1742
1732
  }
1743
1733
  }
1744
1734
  clear() {
1745
- this.value = null;
1746
- this.inputFieldValue = null;
1747
- this.writeModelValue(this.value);
1748
- this.onModelChange(this.value);
1735
+ this.value.set(null);
1736
+ this.inputFieldValue.set(null);
1737
+ this.writeModelValue(this.value());
1738
+ this.onModelChange(this.value());
1749
1739
  this.updateInputfield();
1750
1740
  this.onClear.emit(undefined);
1751
1741
  }
@@ -1759,30 +1749,31 @@ class DatePicker extends BaseInput {
1759
1749
  return this.config.getTranslation('monthNames')[index];
1760
1750
  }
1761
1751
  getYear(month) {
1762
- return this.currentView === 'month' ? this.currentYear : month.year;
1763
- }
1764
- switchViewButtonDisabled() {
1765
- return this.numberOfMonths > 1 || this.$disabled();
1752
+ return this.currentView() === 'month' ? this.currentYear() : month.year;
1766
1753
  }
1754
+ switchViewButtonDisabled = computed(() => {
1755
+ return this.numberOfMonths() > 1 || this.$disabled();
1756
+ }, /* @ts-ignore */
1757
+ ...(ngDevMode ? [{ debugName: "switchViewButtonDisabled" }] : /* istanbul ignore next */ []));
1767
1758
  onPrevButtonClick(event) {
1768
- this.navigationState = { backward: true, button: true };
1759
+ this.navigationState.set({ backward: true, button: true });
1769
1760
  this.navBackward(event);
1770
1761
  }
1771
1762
  onNextButtonClick(event) {
1772
- this.navigationState = { backward: false, button: true };
1763
+ this.navigationState.set({ backward: false, button: true });
1773
1764
  this.navForward(event);
1774
1765
  }
1775
1766
  onContainerButtonKeydown(event) {
1776
1767
  switch (event.which) {
1777
1768
  //tab
1778
1769
  case 9:
1779
- if (!this.inline) {
1770
+ if (!this.inline()) {
1780
1771
  this.trapFocus(event);
1781
1772
  }
1782
- if (this.inline) {
1773
+ if (this.inline()) {
1783
1774
  const headerElements = findSingle(this.el?.nativeElement, '.p-datepicker-header');
1784
1775
  const element = event.target;
1785
- if (this.timeOnly) {
1776
+ if (this.timeOnly()) {
1786
1777
  return;
1787
1778
  }
1788
1779
  else {
@@ -1795,7 +1786,7 @@ class DatePicker extends BaseInput {
1795
1786
  //escape
1796
1787
  case 27:
1797
1788
  this.inputfieldViewChild()?.nativeElement.focus();
1798
- this.overlayVisible = false;
1789
+ this.overlayVisible.set(false);
1799
1790
  event.preventDefault();
1800
1791
  break;
1801
1792
  default:
@@ -1804,27 +1795,27 @@ class DatePicker extends BaseInput {
1804
1795
  }
1805
1796
  }
1806
1797
  onInputKeydown(event) {
1807
- this.isKeydown = true;
1808
- if (event.keyCode === 40 && this.contentViewChild) {
1798
+ this.isKeydown.set(true);
1799
+ if (event.keyCode === 40 && this.contentViewChild()) {
1809
1800
  this.trapFocus(event);
1810
1801
  }
1811
1802
  else if (event.keyCode === 27) {
1812
- if (this.overlayVisible) {
1803
+ if (this.overlayVisible()) {
1813
1804
  this.inputfieldViewChild()?.nativeElement.focus();
1814
- this.overlayVisible = false;
1805
+ this.overlayVisible.set(false);
1815
1806
  event.preventDefault();
1816
1807
  }
1817
1808
  }
1818
1809
  else if (event.keyCode === 13) {
1819
- if (this.overlayVisible) {
1820
- this.overlayVisible = false;
1810
+ if (this.overlayVisible()) {
1811
+ this.overlayVisible.set(false);
1821
1812
  event.preventDefault();
1822
1813
  }
1823
1814
  }
1824
- else if (event.keyCode === 9 && this.contentViewChild) {
1825
- getFocusableElements(this.contentViewChild.nativeElement).forEach((el) => (el.tabIndex = '-1'));
1826
- if (this.overlayVisible) {
1827
- this.overlayVisible = false;
1815
+ else if (event.keyCode === 9 && this.contentViewChild()) {
1816
+ getFocusableElements(this.contentViewChild().nativeElement).forEach((el) => (el.tabIndex = '-1'));
1817
+ if (this.overlayVisible()) {
1818
+ this.overlayVisible.set(false);
1828
1819
  }
1829
1820
  }
1830
1821
  }
@@ -1841,7 +1832,7 @@ class DatePicker extends BaseInput {
1841
1832
  if (nextRow) {
1842
1833
  let focusCell = nextRow.children[cellIndex].children[0];
1843
1834
  if (hasClass(focusCell, 'p-disabled')) {
1844
- this.navigationState = { backward: false };
1835
+ this.navigationState.set({ backward: false });
1845
1836
  this.navForward(event);
1846
1837
  }
1847
1838
  else {
@@ -1850,7 +1841,7 @@ class DatePicker extends BaseInput {
1850
1841
  }
1851
1842
  }
1852
1843
  else {
1853
- this.navigationState = { backward: false };
1844
+ this.navigationState.set({ backward: false });
1854
1845
  this.navForward(event);
1855
1846
  }
1856
1847
  event.preventDefault();
@@ -1864,7 +1855,7 @@ class DatePicker extends BaseInput {
1864
1855
  if (prevRow) {
1865
1856
  let focusCell = prevRow.children[cellIndex].children[0];
1866
1857
  if (hasClass(focusCell, 'p-disabled')) {
1867
- this.navigationState = { backward: true };
1858
+ this.navigationState.set({ backward: true });
1868
1859
  this.navBackward(event);
1869
1860
  }
1870
1861
  else {
@@ -1873,7 +1864,7 @@ class DatePicker extends BaseInput {
1873
1864
  }
1874
1865
  }
1875
1866
  else {
1876
- this.navigationState = { backward: true };
1867
+ this.navigationState.set({ backward: true });
1877
1868
  this.navBackward(event);
1878
1869
  }
1879
1870
  event.preventDefault();
@@ -1930,13 +1921,13 @@ class DatePicker extends BaseInput {
1930
1921
  //escape
1931
1922
  case 27: {
1932
1923
  this.inputfieldViewChild()?.nativeElement.focus();
1933
- this.overlayVisible = false;
1924
+ this.overlayVisible.set(false);
1934
1925
  event.preventDefault();
1935
1926
  break;
1936
1927
  }
1937
1928
  //tab
1938
1929
  case 9: {
1939
- if (!this.inline) {
1930
+ if (!this.inline()) {
1940
1931
  this.trapFocus(event);
1941
1932
  }
1942
1933
  break;
@@ -2014,7 +2005,7 @@ class DatePicker extends BaseInput {
2014
2005
  prevCell.focus();
2015
2006
  }
2016
2007
  else {
2017
- this.navigationState = { backward: true };
2008
+ this.navigationState.set({ backward: true });
2018
2009
  this.navBackward(event);
2019
2010
  }
2020
2011
  event.preventDefault();
@@ -2029,7 +2020,7 @@ class DatePicker extends BaseInput {
2029
2020
  nextCell.focus();
2030
2021
  }
2031
2022
  else {
2032
- this.navigationState = { backward: false };
2023
+ this.navigationState.set({ backward: false });
2033
2024
  this.navForward(event);
2034
2025
  }
2035
2026
  event.preventDefault();
@@ -2046,13 +2037,13 @@ class DatePicker extends BaseInput {
2046
2037
  //escape
2047
2038
  case 27: {
2048
2039
  this.inputfieldViewChild()?.nativeElement.focus();
2049
- this.overlayVisible = false;
2040
+ this.overlayVisible.set(false);
2050
2041
  event.preventDefault();
2051
2042
  break;
2052
2043
  }
2053
2044
  //tab
2054
2045
  case 9: {
2055
- if (!this.inline) {
2046
+ if (!this.inline()) {
2056
2047
  this.trapFocus(event);
2057
2048
  }
2058
2049
  break;
@@ -2088,7 +2079,7 @@ class DatePicker extends BaseInput {
2088
2079
  prevCell.focus();
2089
2080
  }
2090
2081
  else {
2091
- this.navigationState = { backward: true };
2082
+ this.navigationState.set({ backward: true });
2092
2083
  this.navBackward(event);
2093
2084
  }
2094
2085
  event.preventDefault();
@@ -2103,7 +2094,7 @@ class DatePicker extends BaseInput {
2103
2094
  nextCell.focus();
2104
2095
  }
2105
2096
  else {
2106
- this.navigationState = { backward: false };
2097
+ this.navigationState.set({ backward: false });
2107
2098
  this.navForward(event);
2108
2099
  }
2109
2100
  event.preventDefault();
@@ -2120,7 +2111,7 @@ class DatePicker extends BaseInput {
2120
2111
  //escape
2121
2112
  case 27: {
2122
2113
  this.inputfieldViewChild()?.nativeElement.focus();
2123
- this.overlayVisible = false;
2114
+ this.overlayVisible.set(false);
2124
2115
  event.preventDefault();
2125
2116
  break;
2126
2117
  }
@@ -2136,13 +2127,13 @@ class DatePicker extends BaseInput {
2136
2127
  }
2137
2128
  navigateToMonth(prev, groupIndex, focusKey) {
2138
2129
  if (prev) {
2139
- if (this.numberOfMonths === 1 || groupIndex === 0) {
2140
- this.navigationState = { backward: true };
2141
- this._focusKey = focusKey;
2130
+ if (this.numberOfMonths() === 1 || groupIndex === 0) {
2131
+ this.navigationState.set({ backward: true });
2132
+ this._focusKey.set(focusKey);
2142
2133
  this.navBackward(event);
2143
2134
  }
2144
2135
  else {
2145
- let prevMonthContainer = this.contentViewChild.nativeElement.children[groupIndex - 1];
2136
+ let prevMonthContainer = this.contentViewChild().nativeElement.children[groupIndex - 1];
2146
2137
  if (focusKey) {
2147
2138
  const firstDayCell = findSingle(prevMonthContainer, focusKey);
2148
2139
  firstDayCell.tabIndex = '0';
@@ -2157,13 +2148,13 @@ class DatePicker extends BaseInput {
2157
2148
  }
2158
2149
  }
2159
2150
  else {
2160
- if (this.numberOfMonths === 1 || groupIndex === this.numberOfMonths - 1) {
2161
- this.navigationState = { backward: false };
2162
- this._focusKey = focusKey;
2151
+ if (this.numberOfMonths() === 1 || groupIndex === this.numberOfMonths() - 1) {
2152
+ this.navigationState.set({ backward: false });
2153
+ this._focusKey.set(focusKey);
2163
2154
  this.navForward(event);
2164
2155
  }
2165
2156
  else {
2166
- let nextMonthContainer = this.contentViewChild.nativeElement.children[groupIndex + 1];
2157
+ let nextMonthContainer = this.contentViewChild().nativeElement.children[groupIndex + 1];
2167
2158
  if (focusKey) {
2168
2159
  const firstDayCell = findSingle(nextMonthContainer, focusKey);
2169
2160
  firstDayCell.tabIndex = '0';
@@ -2179,39 +2170,39 @@ class DatePicker extends BaseInput {
2179
2170
  }
2180
2171
  updateFocus() {
2181
2172
  let cell;
2182
- if (this.navigationState) {
2183
- if (this.navigationState.button) {
2173
+ if (this.navigationState()) {
2174
+ if (this.navigationState().button) {
2184
2175
  this.initFocusableCell();
2185
- if (this.navigationState.backward)
2186
- findSingle(this.contentViewChild.nativeElement, '.p-datepicker-prev-button').focus();
2176
+ if (this.navigationState().backward)
2177
+ findSingle(this.contentViewChild().nativeElement, '.p-datepicker-prev-button').focus();
2187
2178
  else
2188
- findSingle(this.contentViewChild.nativeElement, '.p-datepicker-next-button').focus();
2179
+ findSingle(this.contentViewChild().nativeElement, '.p-datepicker-next-button').focus();
2189
2180
  }
2190
2181
  else {
2191
- if (this.navigationState.backward) {
2182
+ if (this.navigationState().backward) {
2192
2183
  let cells;
2193
- if (this.currentView === 'month') {
2194
- cells = find(this.contentViewChild.nativeElement, '.p-datepicker-month-view .p-datepicker-month:not(.p-disabled)');
2184
+ if (this.currentView() === 'month') {
2185
+ cells = find(this.contentViewChild().nativeElement, '.p-datepicker-month-view .p-datepicker-month:not(.p-disabled)');
2195
2186
  }
2196
- else if (this.currentView === 'year') {
2197
- cells = find(this.contentViewChild.nativeElement, '.p-datepicker-year-view .p-datepicker-year:not(.p-disabled)');
2187
+ else if (this.currentView() === 'year') {
2188
+ cells = find(this.contentViewChild().nativeElement, '.p-datepicker-year-view .p-datepicker-year:not(.p-disabled)');
2198
2189
  }
2199
2190
  else {
2200
- cells = find(this.contentViewChild.nativeElement, this._focusKey || '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2191
+ cells = find(this.contentViewChild().nativeElement, this._focusKey() || '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2201
2192
  }
2202
2193
  if (cells && cells.length > 0) {
2203
2194
  cell = cells[cells.length - 1];
2204
2195
  }
2205
2196
  }
2206
2197
  else {
2207
- if (this.currentView === 'month') {
2208
- cell = findSingle(this.contentViewChild.nativeElement, '.p-datepicker-month-view .p-datepicker-month:not(.p-disabled)');
2198
+ if (this.currentView() === 'month') {
2199
+ cell = findSingle(this.contentViewChild().nativeElement, '.p-datepicker-month-view .p-datepicker-month:not(.p-disabled)');
2209
2200
  }
2210
- else if (this.currentView === 'year') {
2211
- cell = findSingle(this.contentViewChild.nativeElement, '.p-datepicker-year-view .p-datepicker-year:not(.p-disabled)');
2201
+ else if (this.currentView() === 'year') {
2202
+ cell = findSingle(this.contentViewChild().nativeElement, '.p-datepicker-year-view .p-datepicker-year:not(.p-disabled)');
2212
2203
  }
2213
2204
  else {
2214
- cell = findSingle(this.contentViewChild.nativeElement, this._focusKey || '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2205
+ cell = findSingle(this.contentViewChild().nativeElement, this._focusKey() || '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)');
2215
2206
  }
2216
2207
  }
2217
2208
  if (cell) {
@@ -2219,17 +2210,17 @@ class DatePicker extends BaseInput {
2219
2210
  cell.focus();
2220
2211
  }
2221
2212
  }
2222
- this.navigationState = null;
2223
- this._focusKey = null;
2213
+ this.navigationState.set(null);
2214
+ this._focusKey.set(null);
2224
2215
  }
2225
2216
  else {
2226
2217
  this.initFocusableCell();
2227
2218
  }
2228
2219
  }
2229
2220
  initFocusableCell() {
2230
- const contentEl = this.contentViewChild?.nativeElement;
2221
+ const contentEl = this.contentViewChild()?.nativeElement;
2231
2222
  let cell;
2232
- if (this.currentView === 'month') {
2223
+ if (this.currentView() === 'month') {
2233
2224
  let cells = find(contentEl, '.p-datepicker-month-view .p-datepicker-month:not(.p-disabled)');
2234
2225
  let selectedCell = findSingle(contentEl, '.p-datepicker-month-view .p-datepicker-month.p-highlight');
2235
2226
  cells.forEach((cell) => (cell.tabIndex = -1));
@@ -2239,7 +2230,7 @@ class DatePicker extends BaseInput {
2239
2230
  disabledCells.forEach((cell) => (cell.tabIndex = -1));
2240
2231
  }
2241
2232
  }
2242
- else if (this.currentView === 'year') {
2233
+ else if (this.currentView() === 'year') {
2243
2234
  let cells = find(contentEl, '.p-datepicker-year-view .p-datepicker-year:not(.p-disabled)');
2244
2235
  let selectedCell = findSingle(contentEl, '.p-datepicker-year-view .p-datepicker-year.p-highlight');
2245
2236
  cells.forEach((cell) => (cell.tabIndex = -1));
@@ -2261,18 +2252,18 @@ class DatePicker extends BaseInput {
2261
2252
  }
2262
2253
  if (cell) {
2263
2254
  cell.tabIndex = '0';
2264
- if (!this.preventFocus && (!this.navigationState || !this.navigationState.button)) {
2255
+ if (!this.preventFocus() && (!this.navigationState() || !this.navigationState().button)) {
2265
2256
  setTimeout(() => {
2266
2257
  if (!this.$disabled()) {
2267
2258
  cell.focus();
2268
2259
  }
2269
2260
  }, 1);
2270
2261
  }
2271
- this.preventFocus = false;
2262
+ this.preventFocus.set(false);
2272
2263
  }
2273
2264
  }
2274
2265
  trapFocus(event) {
2275
- let focusableElements = getFocusableElements(this.contentViewChild.nativeElement);
2266
+ let focusableElements = getFocusableElements(this.contentViewChild().nativeElement);
2276
2267
  if (focusableElements && focusableElements.length > 0) {
2277
2268
  if (!focusableElements[0].ownerDocument.activeElement) {
2278
2269
  focusableElements[0].focus();
@@ -2281,7 +2272,7 @@ class DatePicker extends BaseInput {
2281
2272
  let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);
2282
2273
  if (event.shiftKey) {
2283
2274
  if (focusedIndex == -1 || focusedIndex === 0) {
2284
- if (this.focusTrap) {
2275
+ if (this.focusTrap()) {
2285
2276
  focusableElements[focusableElements.length - 1].focus();
2286
2277
  }
2287
2278
  else {
@@ -2297,7 +2288,7 @@ class DatePicker extends BaseInput {
2297
2288
  }
2298
2289
  else {
2299
2290
  if (focusedIndex == -1) {
2300
- if (this.timeOnly) {
2291
+ if (this.timeOnly()) {
2301
2292
  focusableElements[0].focus();
2302
2293
  }
2303
2294
  else {
@@ -2310,7 +2301,7 @@ class DatePicker extends BaseInput {
2310
2301
  }
2311
2302
  }
2312
2303
  else if (focusedIndex === focusableElements.length - 1) {
2313
- if (!this.focusTrap && focusedIndex != -1)
2304
+ if (!this.focusTrap() && focusedIndex != -1)
2314
2305
  return this.hideOverlay();
2315
2306
  focusableElements[0].focus();
2316
2307
  }
@@ -2322,19 +2313,9 @@ class DatePicker extends BaseInput {
2322
2313
  }
2323
2314
  event.preventDefault();
2324
2315
  }
2325
- onMonthDropdownChange(m) {
2326
- this.currentMonth = parseInt(m);
2327
- this.onMonthChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
2328
- this.createMonths(this.currentMonth, this.currentYear);
2329
- }
2330
- onYearDropdownChange(y) {
2331
- this.currentYear = parseInt(y);
2332
- this.onYearChange.emit({ month: this.currentMonth + 1, year: this.currentYear });
2333
- this.createMonths(this.currentMonth, this.currentYear);
2334
- }
2335
2316
  convertTo24Hour(hours, pm) {
2336
2317
  //@ts-ignore
2337
- if (this.hourFormat == '12') {
2318
+ if (this.hourFormat() == '12') {
2338
2319
  if (hours === 12) {
2339
2320
  return pm ? 12 : 0;
2340
2321
  }
@@ -2347,94 +2328,97 @@ class DatePicker extends BaseInput {
2347
2328
  constrainTime(hour, minute, second, pm) {
2348
2329
  let returnTimeTriple = [hour, minute, second];
2349
2330
  let minHoursExceeds12 = false;
2350
- let value = this.value;
2331
+ let value = this.value();
2351
2332
  const convertedHour = this.convertTo24Hour(hour, pm);
2352
2333
  const isRange = this.isRangeSelection(), isMultiple = this.isMultipleSelection(), isMultiValue = isRange || isMultiple;
2353
2334
  if (isMultiValue) {
2354
- if (!this.value) {
2355
- this.value = [new Date(), new Date()];
2335
+ if (!this.value()) {
2336
+ this.value.set([new Date(), new Date()]);
2356
2337
  }
2357
2338
  if (isRange) {
2358
- value = this.value[1] || this.value[0];
2339
+ value = this.value()[1] || this.value()[0];
2359
2340
  }
2360
2341
  if (isMultiple) {
2361
- value = this.value[this.value.length - 1];
2342
+ value = this.value()[this.value().length - 1];
2362
2343
  }
2363
2344
  }
2364
2345
  const valueDateString = value && isDate(value) ? value.toDateString() : null;
2365
- let isMinDate = this.minDate && valueDateString && this.minDate.toDateString() === valueDateString;
2366
- let isMaxDate = this.maxDate && valueDateString && this.maxDate.toDateString() === valueDateString;
2346
+ let isMinDate = this.minDate() && valueDateString && this.minDate().toDateString() === valueDateString;
2347
+ let isMaxDate = this.maxDate() && valueDateString && this.maxDate().toDateString() === valueDateString;
2367
2348
  if (isMinDate) {
2368
- minHoursExceeds12 = this.minDate.getHours() >= 12;
2349
+ minHoursExceeds12 = this.minDate().getHours() >= 12;
2369
2350
  }
2370
2351
  switch (true // intentional fall through
2371
2352
  ) {
2372
- case isMinDate && minHoursExceeds12 && this.minDate.getHours() === 12 && this.minDate.getHours() > convertedHour:
2353
+ case isMinDate && minHoursExceeds12 && this.minDate().getHours() === 12 && this.minDate().getHours() > convertedHour:
2373
2354
  returnTimeTriple[0] = 11;
2374
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() > minute:
2375
- returnTimeTriple[1] = this.minDate.getMinutes();
2376
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() === minute && this.minDate.getSeconds() > second:
2377
- returnTimeTriple[2] = this.minDate.getSeconds();
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();
2378
2359
  break;
2379
- case isMinDate && !minHoursExceeds12 && this.minDate.getHours() - 1 === convertedHour && this.minDate.getHours() > convertedHour:
2360
+ case isMinDate && !minHoursExceeds12 && this.minDate().getHours() - 1 === convertedHour && this.minDate().getHours() > convertedHour:
2380
2361
  returnTimeTriple[0] = 11;
2381
- this.pm = true;
2382
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() > minute:
2383
- returnTimeTriple[1] = this.minDate.getMinutes();
2384
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() === minute && this.minDate.getSeconds() > second:
2385
- returnTimeTriple[2] = this.minDate.getSeconds();
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();
2386
2367
  break;
2387
- case isMinDate && minHoursExceeds12 && this.minDate.getHours() > convertedHour && convertedHour !== 12:
2388
- this.setCurrentHourPM(this.minDate.getHours());
2389
- returnTimeTriple[0] = this.currentHour || 0;
2390
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() > minute:
2391
- returnTimeTriple[1] = this.minDate.getMinutes();
2392
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() === minute && this.minDate.getSeconds() > second:
2393
- returnTimeTriple[2] = this.minDate.getSeconds();
2368
+ case isMinDate && minHoursExceeds12 && this.minDate().getHours() > convertedHour && convertedHour !== 12:
2369
+ this.setCurrentHourPM(this.minDate().getHours());
2370
+ returnTimeTriple[0] = this.currentHour() || 0;
2371
+ case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() > minute:
2372
+ returnTimeTriple[1] = this.minDate().getMinutes();
2373
+ case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() === minute && this.minDate().getSeconds() > second:
2374
+ returnTimeTriple[2] = this.minDate().getSeconds();
2394
2375
  break;
2395
- case isMinDate && this.minDate.getHours() > convertedHour:
2396
- returnTimeTriple[0] = this.minDate.getHours();
2397
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() > minute:
2398
- returnTimeTriple[1] = this.minDate.getMinutes();
2399
- case isMinDate && this.minDate.getHours() === convertedHour && this.minDate.getMinutes() === minute && this.minDate.getSeconds() > second:
2400
- returnTimeTriple[2] = this.minDate.getSeconds();
2376
+ case isMinDate && this.minDate().getHours() > convertedHour:
2377
+ returnTimeTriple[0] = this.minDate().getHours();
2378
+ case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() > minute:
2379
+ returnTimeTriple[1] = this.minDate().getMinutes();
2380
+ case isMinDate && this.minDate().getHours() === convertedHour && this.minDate().getMinutes() === minute && this.minDate().getSeconds() > second:
2381
+ returnTimeTriple[2] = this.minDate().getSeconds();
2401
2382
  break;
2402
- case isMaxDate && this.maxDate.getHours() < convertedHour:
2403
- returnTimeTriple[0] = this.maxDate.getHours();
2404
- case isMaxDate && this.maxDate.getHours() === convertedHour && this.maxDate.getMinutes() < minute:
2405
- returnTimeTriple[1] = this.maxDate.getMinutes();
2406
- case isMaxDate && this.maxDate.getHours() === convertedHour && this.maxDate.getMinutes() === minute && this.maxDate.getSeconds() < second:
2407
- returnTimeTriple[2] = this.maxDate.getSeconds();
2383
+ case isMaxDate && this.maxDate().getHours() < convertedHour:
2384
+ returnTimeTriple[0] = this.maxDate().getHours();
2385
+ case isMaxDate && this.maxDate().getHours() === convertedHour && this.maxDate().getMinutes() < minute:
2386
+ returnTimeTriple[1] = this.maxDate().getMinutes();
2387
+ case isMaxDate && this.maxDate().getHours() === convertedHour && this.maxDate().getMinutes() === minute && this.maxDate().getSeconds() < second:
2388
+ returnTimeTriple[2] = this.maxDate().getSeconds();
2408
2389
  break;
2409
2390
  }
2410
2391
  return returnTimeTriple;
2411
2392
  }
2412
2393
  incrementHour(event) {
2413
- const prevHour = this.currentHour ?? 0;
2414
- let newHour = (this.currentHour ?? 0) + this.stepHour;
2415
- let newPM = this.pm;
2416
- if (this.hourFormat == '24')
2394
+ const prevHour = this.currentHour() ?? 0;
2395
+ let newHour = (this.currentHour() ?? 0) + this.stepHour();
2396
+ let newPM = this.pm();
2397
+ if (this.hourFormat() == '24')
2417
2398
  newHour = newHour >= 24 ? newHour - 24 : newHour;
2418
- else if (this.hourFormat == '12') {
2399
+ else if (this.hourFormat() == '12') {
2419
2400
  // Before the AM/PM break, now after
2420
2401
  if (prevHour < 12 && newHour > 11) {
2421
- newPM = !this.pm;
2402
+ newPM = !this.pm();
2422
2403
  }
2423
2404
  newHour = newHour >= 13 ? newHour - 12 : newHour;
2424
2405
  }
2425
2406
  this.toggleAMPMIfNotMinDate(newPM);
2426
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(newHour, this.currentMinute, this.currentSecond, newPM);
2407
+ const [hour, minute, second] = this.constrainTime(newHour, this.currentMinute(), this.currentSecond(), newPM);
2408
+ this.currentHour.set(hour);
2409
+ this.currentMinute.set(minute);
2410
+ this.currentSecond.set(second);
2427
2411
  event.preventDefault();
2428
2412
  }
2429
2413
  toggleAMPMIfNotMinDate(newPM) {
2430
- let value = this.value;
2414
+ let value = this.value();
2431
2415
  const valueDateString = value && isDate(value) ? value.toDateString() : null;
2432
- let isMinDate = this.minDate && valueDateString && this.minDate.toDateString() === valueDateString;
2433
- if (isMinDate && this.minDate.getHours() >= 12) {
2434
- this.pm = true;
2416
+ let isMinDate = this.minDate() && valueDateString && this.minDate().toDateString() === valueDateString;
2417
+ if (isMinDate && this.minDate().getHours() >= 12) {
2418
+ this.pm.set(true);
2435
2419
  }
2436
2420
  else {
2437
- this.pm = newPM;
2421
+ this.pm.set(newPM);
2438
2422
  }
2439
2423
  }
2440
2424
  onTimePickerElementMouseDown(event, type, direction) {
@@ -2450,7 +2434,7 @@ class DatePicker extends BaseInput {
2450
2434
  }
2451
2435
  }
2452
2436
  onTimePickerElementMouseLeave() {
2453
- if (!this.$disabled() && this.timePickerTimer) {
2437
+ if (!this.$disabled() && this.timePickerTimer()) {
2454
2438
  this.clearTimePickerTimer();
2455
2439
  this.updateTime();
2456
2440
  }
@@ -2458,10 +2442,9 @@ class DatePicker extends BaseInput {
2458
2442
  repeat(event, interval, type, direction) {
2459
2443
  let i = interval || 500;
2460
2444
  this.clearTimePickerTimer();
2461
- this.timePickerTimer = setTimeout(() => {
2445
+ this.timePickerTimer.set(setTimeout(() => {
2462
2446
  this.repeat(event, 100, type, direction);
2463
- this.cd.markForCheck();
2464
- }, i);
2447
+ }, i));
2465
2448
  switch (type) {
2466
2449
  case 0:
2467
2450
  if (direction === 1)
@@ -2485,97 +2468,115 @@ class DatePicker extends BaseInput {
2485
2468
  this.updateInputfield();
2486
2469
  }
2487
2470
  clearTimePickerTimer() {
2488
- if (this.timePickerTimer) {
2489
- clearTimeout(this.timePickerTimer);
2490
- this.timePickerTimer = null;
2471
+ if (this.timePickerTimer()) {
2472
+ clearTimeout(this.timePickerTimer());
2473
+ this.timePickerTimer.set(null);
2491
2474
  }
2492
2475
  }
2493
2476
  decrementHour(event) {
2494
- let newHour = (this.currentHour ?? 0) - this.stepHour;
2495
- let newPM = this.pm;
2496
- if (this.hourFormat == '24')
2477
+ let newHour = (this.currentHour() ?? 0) - this.stepHour();
2478
+ let newPM = this.pm();
2479
+ if (this.hourFormat() == '24')
2497
2480
  newHour = newHour < 0 ? 24 + newHour : newHour;
2498
- else if (this.hourFormat == '12') {
2481
+ else if (this.hourFormat() == '12') {
2499
2482
  // If we were at noon/midnight, then switch
2500
- if (this.currentHour === 12) {
2501
- newPM = !this.pm;
2483
+ if (this.currentHour() === 12) {
2484
+ newPM = !this.pm();
2502
2485
  }
2503
2486
  newHour = newHour <= 0 ? 12 + newHour : newHour;
2504
2487
  }
2505
2488
  this.toggleAMPMIfNotMinDate(newPM);
2506
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(newHour, this.currentMinute, this.currentSecond, newPM);
2489
+ const [hour, minute, second] = this.constrainTime(newHour, this.currentMinute(), this.currentSecond(), newPM);
2490
+ this.currentHour.set(hour);
2491
+ this.currentMinute.set(minute);
2492
+ this.currentSecond.set(second);
2507
2493
  event.preventDefault();
2508
2494
  }
2509
2495
  incrementMinute(event) {
2510
- let newMinute = (this.currentMinute ?? 0) + this.stepMinute;
2496
+ let newMinute = (this.currentMinute() ?? 0) + this.stepMinute();
2511
2497
  newMinute = newMinute > 59 ? newMinute - 60 : newMinute;
2512
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(this.currentHour || 0, newMinute, this.currentSecond, this.pm);
2498
+ const [hour, minute, second] = this.constrainTime(this.currentHour() || 0, newMinute, this.currentSecond(), this.pm());
2499
+ this.currentHour.set(hour);
2500
+ this.currentMinute.set(minute);
2501
+ this.currentSecond.set(second);
2513
2502
  event.preventDefault();
2514
2503
  }
2515
2504
  decrementMinute(event) {
2516
- let newMinute = (this.currentMinute ?? 0) - this.stepMinute;
2505
+ let newMinute = (this.currentMinute() ?? 0) - this.stepMinute();
2517
2506
  newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
2518
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(this.currentHour || 0, newMinute, this.currentSecond || 0, this.pm);
2507
+ const [hour, minute, second] = this.constrainTime(this.currentHour() || 0, newMinute, this.currentSecond() || 0, this.pm());
2508
+ this.currentHour.set(hour);
2509
+ this.currentMinute.set(minute);
2510
+ this.currentSecond.set(second);
2519
2511
  event.preventDefault();
2520
2512
  }
2521
2513
  incrementSecond(event) {
2522
- let newSecond = this.currentSecond + this.stepSecond;
2514
+ let newSecond = this.currentSecond() + this.stepSecond();
2523
2515
  newSecond = newSecond > 59 ? newSecond - 60 : newSecond;
2524
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(this.currentHour || 0, this.currentMinute || 0, newSecond, this.pm);
2516
+ const [hour, minute, second] = this.constrainTime(this.currentHour() || 0, this.currentMinute() || 0, newSecond, this.pm());
2517
+ this.currentHour.set(hour);
2518
+ this.currentMinute.set(minute);
2519
+ this.currentSecond.set(second);
2525
2520
  event.preventDefault();
2526
2521
  }
2527
2522
  decrementSecond(event) {
2528
- let newSecond = this.currentSecond - this.stepSecond;
2523
+ let newSecond = this.currentSecond() - this.stepSecond();
2529
2524
  newSecond = newSecond < 0 ? 60 + newSecond : newSecond;
2530
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(this.currentHour || 0, this.currentMinute || 0, newSecond, this.pm);
2525
+ const [hour, minute, second] = this.constrainTime(this.currentHour() || 0, this.currentMinute() || 0, newSecond, this.pm());
2526
+ this.currentHour.set(hour);
2527
+ this.currentMinute.set(minute);
2528
+ this.currentSecond.set(second);
2531
2529
  event.preventDefault();
2532
2530
  }
2533
2531
  updateTime() {
2534
- let value = this.value;
2532
+ let value = this.value();
2535
2533
  if (this.isRangeSelection()) {
2536
- value = this.value[1] || this.value[0];
2534
+ value = this.value()[1] || this.value()[0];
2537
2535
  }
2538
2536
  if (this.isMultipleSelection()) {
2539
- value = this.value[this.value.length - 1];
2537
+ value = this.value()[this.value().length - 1];
2540
2538
  }
2541
2539
  value = value && isDate(value) ? new Date(value.getTime()) : new Date();
2542
- if (this.hourFormat == '12') {
2543
- if (this.currentHour === 12)
2544
- value.setHours(this.pm ? 12 : 0);
2540
+ if (this.hourFormat() == '12') {
2541
+ if (this.currentHour() === 12)
2542
+ value.setHours(this.pm() ? 12 : 0);
2545
2543
  else
2546
- value.setHours(this.pm ? this.currentHour + 12 : this.currentHour);
2544
+ value.setHours(this.pm() ? this.currentHour() + 12 : this.currentHour());
2547
2545
  }
2548
2546
  else {
2549
- value.setHours(this.currentHour);
2547
+ value.setHours(this.currentHour());
2550
2548
  }
2551
- value.setMinutes(this.currentMinute);
2552
- value.setSeconds(this.currentSecond);
2549
+ value.setMinutes(this.currentMinute());
2550
+ value.setSeconds(this.currentSecond());
2553
2551
  if (this.isRangeSelection()) {
2554
- if (this.value[1])
2555
- value = [this.value[0], value];
2552
+ if (this.value()[1])
2553
+ value = [this.value()[0], value];
2556
2554
  else
2557
2555
  value = [value, null];
2558
2556
  }
2559
2557
  if (this.isMultipleSelection()) {
2560
- value = [...this.value.slice(0, -1), value];
2558
+ value = [...this.value().slice(0, -1), value];
2561
2559
  }
2562
2560
  this.updateModel(value);
2563
2561
  this.onSelect.emit(value);
2564
2562
  this.updateInputfield();
2565
2563
  }
2566
2564
  toggleAMPM(event) {
2567
- const newPM = !this.pm;
2568
- this.pm = newPM;
2569
- [this.currentHour, this.currentMinute, this.currentSecond] = this.constrainTime(this.currentHour || 0, this.currentMinute || 0, this.currentSecond || 0, newPM);
2565
+ const newPM = !this.pm();
2566
+ this.pm.set(newPM);
2567
+ const [hour, minute, second] = this.constrainTime(this.currentHour() || 0, this.currentMinute() || 0, this.currentSecond() || 0, newPM);
2568
+ this.currentHour.set(hour);
2569
+ this.currentMinute.set(minute);
2570
+ this.currentSecond.set(second);
2570
2571
  this.updateTime();
2571
2572
  event.preventDefault();
2572
2573
  }
2573
2574
  onUserInput(event) {
2574
2575
  // IE 11 Workaround for input placeholder : https://github.com/primefaces/primeng/issues/2026
2575
- if (!this.isKeydown) {
2576
+ if (!this.isKeydown()) {
2576
2577
  return;
2577
2578
  }
2578
- this.isKeydown = false;
2579
+ this.isKeydown.set(false);
2579
2580
  let val = event.target.value;
2580
2581
  try {
2581
2582
  let value = this.parseValueFromString(val);
@@ -2583,13 +2584,13 @@ class DatePicker extends BaseInput {
2583
2584
  this.updateModel(value);
2584
2585
  this.updateUI();
2585
2586
  }
2586
- else if (this.keepInvalid) {
2587
+ else if (this.keepInvalid()) {
2587
2588
  this.updateModel(value);
2588
2589
  }
2589
2590
  }
2590
2591
  catch (err) {
2591
2592
  //invalid date
2592
- let value = this.keepInvalid ? val : null;
2593
+ let value = this.keepInvalid() ? val : null;
2593
2594
  this.updateModel(value);
2594
2595
  }
2595
2596
  this.onInput.emit(event);
@@ -2613,14 +2614,14 @@ class DatePicker extends BaseInput {
2613
2614
  value = this.parseDateTime(text);
2614
2615
  }
2615
2616
  else if (this.isMultipleSelection()) {
2616
- let tokens = text.split(this.multipleSeparator);
2617
+ let tokens = text.split(this.multipleSeparator());
2617
2618
  value = [];
2618
2619
  for (let token of tokens) {
2619
2620
  value.push(this.parseDateTime(token.trim()));
2620
2621
  }
2621
2622
  }
2622
2623
  else if (this.isRangeSelection()) {
2623
- let tokens = text.split(' ' + this.rangeSeparator + ' ');
2624
+ let tokens = text.split(' ' + this.rangeSeparator() + ' ');
2624
2625
  value = [];
2625
2626
  for (let i = 0; i < tokens.length; i++) {
2626
2627
  value[i] = this.parseDateTime(tokens[i].trim());
@@ -2631,14 +2632,14 @@ class DatePicker extends BaseInput {
2631
2632
  parseDateTime(text) {
2632
2633
  let date;
2633
2634
  let parts = text.split(' ');
2634
- if (this.timeOnly) {
2635
+ if (this.timeOnly()) {
2635
2636
  date = new Date();
2636
2637
  this.populateTime(date, parts[0], parts[1]);
2637
2638
  }
2638
2639
  else {
2639
2640
  const dateFormat = this.getDateFormat();
2640
- if (this.showTime) {
2641
- let ampm = this.hourFormat == '12' ? parts.pop() : null;
2641
+ if (this.showTime()) {
2642
+ let ampm = this.hourFormat() == '12' ? parts.pop() : null;
2642
2643
  let timeString = parts.pop();
2643
2644
  date = this.parseDate(parts.join(' '), dateFormat);
2644
2645
  this.populateTime(date, timeString, ampm);
@@ -2650,10 +2651,10 @@ class DatePicker extends BaseInput {
2650
2651
  return date;
2651
2652
  }
2652
2653
  populateTime(value, timeString, ampm) {
2653
- if (this.hourFormat == '12' && !ampm) {
2654
+ if (this.hourFormat() == '12' && !ampm) {
2654
2655
  throw 'Invalid Time';
2655
2656
  }
2656
- this.pm = ampm === 'PM' || ampm === 'pm';
2657
+ this.pm.set(ampm === 'PM' || ampm === 'pm');
2657
2658
  let time = this.parseTime(timeString);
2658
2659
  value.setHours(time.hour);
2659
2660
  value.setMinutes(time.minute);
@@ -2663,46 +2664,45 @@ class DatePicker extends BaseInput {
2663
2664
  return isDate(date) && isNotEmpty(date);
2664
2665
  }
2665
2666
  updateUI() {
2666
- let propValue = this.value;
2667
+ let propValue = this.value();
2667
2668
  if (Array.isArray(propValue)) {
2668
2669
  propValue = propValue.length === 2 ? propValue[1] : propValue[0];
2669
2670
  }
2670
- let val = this.defaultDate && this.isValidDate(this.defaultDate) && !this.value ? this.defaultDate : propValue && this.isValidDate(propValue) ? propValue : new Date();
2671
- this.currentMonth = val.getMonth();
2672
- this.currentYear = val.getFullYear();
2673
- this.createMonths(this.currentMonth, this.currentYear);
2674
- if (this.showTime || this.timeOnly) {
2671
+ let val = this.defaultDate() && this.isValidDate(this.defaultDate()) && !this.value() ? this.defaultDate() : propValue && this.isValidDate(propValue) ? propValue : new Date();
2672
+ this.currentMonth.set(val.getMonth());
2673
+ this.currentYear.set(val.getFullYear());
2674
+ this.createMonths(this.currentMonth(), this.currentYear());
2675
+ if (this.showTime() || this.timeOnly()) {
2675
2676
  this.setCurrentHourPM(val.getHours());
2676
- this.currentMinute = val.getMinutes();
2677
- this.currentSecond = this.showSeconds ? val.getSeconds() : 0;
2677
+ this.currentMinute.set(val.getMinutes());
2678
+ this.currentSecond.set(this.showSeconds() ? val.getSeconds() : 0);
2678
2679
  }
2679
2680
  }
2680
2681
  showOverlay() {
2681
- if (!this.overlayVisible) {
2682
+ if (!this.overlayVisible()) {
2682
2683
  this.updateUI();
2683
- if (!this.touchUI) {
2684
- this.preventFocus = true;
2684
+ if (!this.touchUI()) {
2685
+ this.preventFocus.set(true);
2685
2686
  }
2686
- this.overlayMinWidth = this.el.nativeElement.offsetWidth;
2687
- this.overlayVisible = true;
2687
+ this.overlayMinWidth.set(this.el.nativeElement.offsetWidth);
2688
+ this.overlayVisible.set(true);
2688
2689
  }
2689
2690
  }
2690
2691
  hideOverlay() {
2691
2692
  const activeElement = this.document.activeElement;
2692
- const isFocusInDatepicker = !activeElement || activeElement === this.document.body || this.el.nativeElement.contains(activeElement) || (this.overlay && this.overlay.contains(activeElement));
2693
+ const isFocusInDatepicker = !activeElement || activeElement === this.document.body || this.el.nativeElement.contains(activeElement) || (this.overlay() && this.overlay().contains(activeElement));
2693
2694
  if (isFocusInDatepicker) {
2694
2695
  this.inputfieldViewChild()?.nativeElement.focus();
2695
2696
  }
2696
- this.overlayVisible = false;
2697
+ this.overlayVisible.set(false);
2697
2698
  this.clearTimePickerTimer();
2698
- if (this.touchUI) {
2699
+ if (this.touchUI()) {
2699
2700
  this.disableModality();
2700
2701
  }
2701
- this.cd.markForCheck();
2702
2702
  }
2703
2703
  toggle() {
2704
- if (!this.inline) {
2705
- if (!this.overlayVisible) {
2704
+ if (!this.inline()) {
2705
+ if (!this.overlayVisible()) {
2706
2706
  this.showOverlay();
2707
2707
  this.inputfieldViewChild()?.nativeElement.focus();
2708
2708
  }
@@ -2712,10 +2712,10 @@ class DatePicker extends BaseInput {
2712
2712
  }
2713
2713
  }
2714
2714
  onOverlayBeforeEnter(event) {
2715
- this.overlay = event.element;
2716
- this.$attrSelector && this.overlay.setAttribute(this.$attrSelector, '');
2717
- const styles = !this.inline ? { position: 'absolute', top: '0', minWidth: `${this.overlayMinWidth}px` } : undefined;
2718
- addStyle(this.overlay, styles || {});
2715
+ this.overlay.set(event.element);
2716
+ this.$attrSelector && this.overlay().setAttribute(this.$attrSelector, '');
2717
+ const styles = !this.inline() ? { position: 'absolute', top: '0', minWidth: `${this.overlayMinWidth()}px` } : undefined;
2718
+ addStyle(this.overlay(), styles || {});
2719
2719
  this.appendOverlay();
2720
2720
  this.alignOverlay();
2721
2721
  this.setZIndex();
@@ -2724,7 +2724,7 @@ class DatePicker extends BaseInput {
2724
2724
  this.onShow.emit(event.element);
2725
2725
  }
2726
2726
  onOverlayAfterLeave(event) {
2727
- if (this.autoZIndex) {
2727
+ if (this.autoZIndex()) {
2728
2728
  ZIndexUtils.clear(event.element);
2729
2729
  }
2730
2730
  this.restoreOverlayAppend();
@@ -2734,26 +2734,26 @@ class DatePicker extends BaseInput {
2734
2734
  appendOverlay() {
2735
2735
  if (this.$appendTo() && this.$appendTo() !== 'self') {
2736
2736
  if (this.$appendTo() === 'body')
2737
- this.document.body.appendChild(this.overlay);
2737
+ this.document.body.appendChild(this.overlay());
2738
2738
  else
2739
- appendChild(this.$appendTo(), this.overlay);
2739
+ appendChild(this.$appendTo(), this.overlay());
2740
2740
  }
2741
2741
  }
2742
2742
  restoreOverlayAppend() {
2743
- if (this.overlay && this.$appendTo() !== 'self') {
2744
- this.el.nativeElement.appendChild(this.overlay);
2743
+ if (this.overlay() && this.$appendTo() !== 'self') {
2744
+ this.el.nativeElement.appendChild(this.overlay());
2745
2745
  }
2746
2746
  }
2747
2747
  alignOverlay() {
2748
- if (this.touchUI) {
2749
- this.enableModality(this.overlay);
2748
+ if (this.touchUI()) {
2749
+ this.enableModality(this.overlay());
2750
2750
  }
2751
- else if (this.overlay) {
2751
+ else if (this.overlay()) {
2752
2752
  if (this.$appendTo() && this.$appendTo() !== 'self') {
2753
- absolutePosition(this.overlay, this.inputfieldViewChild()?.nativeElement);
2753
+ absolutePosition(this.overlay(), this.inputfieldViewChild()?.nativeElement);
2754
2754
  }
2755
2755
  else {
2756
- relativePosition(this.overlay, this.inputfieldViewChild()?.nativeElement);
2756
+ relativePosition(this.overlay(), this.inputfieldViewChild()?.nativeElement);
2757
2757
  }
2758
2758
  }
2759
2759
  }
@@ -2763,40 +2763,40 @@ class DatePicker extends BaseInput {
2763
2763
  this.bindScrollListener();
2764
2764
  }
2765
2765
  setZIndex() {
2766
- if (this.autoZIndex) {
2767
- if (this.touchUI)
2768
- ZIndexUtils.set('modal', this.overlay, this.baseZIndex || this.config.zIndex.modal);
2766
+ if (this.autoZIndex()) {
2767
+ if (this.touchUI())
2768
+ ZIndexUtils.set('modal', this.overlay(), this.baseZIndex() || this.config.zIndex.modal);
2769
2769
  else
2770
- ZIndexUtils.set('overlay', this.overlay, this.baseZIndex || this.config.zIndex.overlay);
2770
+ ZIndexUtils.set('overlay', this.overlay(), this.baseZIndex() || this.config.zIndex.overlay);
2771
2771
  }
2772
2772
  }
2773
2773
  enableModality(element) {
2774
- if (!this.mask && this.touchUI) {
2775
- this.mask = this.renderer.createElement('div');
2776
- this.renderer.setStyle(this.mask, 'zIndex', String(parseInt(element.style.zIndex) - 1));
2774
+ if (!this.mask() && this.touchUI()) {
2775
+ this.mask.set(this.renderer.createElement('div'));
2776
+ this.renderer.setStyle(this.mask(), 'zIndex', String(parseInt(element.style.zIndex) - 1));
2777
2777
  let maskStyleClass = 'p-overlay-mask p-datepicker-mask p-datepicker-mask-scrollblocker p-overlay-mask p-overlay-mask-enter-active';
2778
- addClass(this.mask, maskStyleClass);
2779
- this.maskClickListener = this.renderer.listen(this.mask, 'click', (event) => {
2778
+ addClass(this.mask(), maskStyleClass);
2779
+ this.maskClickListener.set(this.renderer.listen(this.mask(), 'click', (event) => {
2780
2780
  this.disableModality();
2781
- this.overlayVisible = false;
2782
- });
2783
- this.renderer.appendChild(this.document.body, this.mask);
2781
+ this.overlayVisible.set(false);
2782
+ }));
2783
+ this.renderer.appendChild(this.document.body, this.mask());
2784
2784
  blockBodyScroll();
2785
2785
  }
2786
2786
  }
2787
2787
  disableModality() {
2788
- if (this.mask) {
2789
- addClass(this.mask, 'p-overlay-mask-leave');
2790
- if (!this.animationEndListener) {
2791
- this.animationEndListener = this.renderer.listen(this.mask, 'animationend', this.destroyMask.bind(this));
2788
+ if (this.mask()) {
2789
+ addClass(this.mask(), 'p-overlay-mask-leave');
2790
+ if (!this.animationEndListener()) {
2791
+ this.animationEndListener.set(this.renderer.listen(this.mask(), 'animationend', this.destroyMask.bind(this)));
2792
2792
  }
2793
2793
  }
2794
2794
  }
2795
2795
  destroyMask() {
2796
- if (!this.mask) {
2796
+ if (!this.mask()) {
2797
2797
  return;
2798
2798
  }
2799
- this.renderer.removeChild(this.document.body, this.mask);
2799
+ this.renderer.removeChild(this.document.body, this.mask());
2800
2800
  let bodyChildren = this.document.body.children;
2801
2801
  let hasBlockerMasks;
2802
2802
  for (let i = 0; i < bodyChildren.length; i++) {
@@ -2811,25 +2811,25 @@ class DatePicker extends BaseInput {
2811
2811
  }
2812
2812
  this.unbindAnimationEndListener();
2813
2813
  this.unbindMaskClickListener();
2814
- this.mask = null;
2814
+ this.mask.set(null);
2815
2815
  }
2816
2816
  unbindMaskClickListener() {
2817
- if (this.maskClickListener) {
2818
- this.maskClickListener();
2819
- this.maskClickListener = null;
2817
+ if (this.maskClickListener()) {
2818
+ this.maskClickListener()();
2819
+ this.maskClickListener.set(null);
2820
2820
  }
2821
2821
  }
2822
2822
  unbindAnimationEndListener() {
2823
- if (this.animationEndListener && this.mask) {
2824
- this.animationEndListener();
2825
- this.animationEndListener = null;
2823
+ if (this.animationEndListener() && this.mask()) {
2824
+ this.animationEndListener()();
2825
+ this.animationEndListener.set(null);
2826
2826
  }
2827
2827
  }
2828
2828
  getDateFormat() {
2829
- return this.dateFormat || this.getTranslation('dateFormat');
2829
+ return this.dateFormat() || this.getTranslation('dateFormat');
2830
2830
  }
2831
2831
  getFirstDateOfWeek() {
2832
- return this._firstDayOfWeek || this.getTranslation(TranslationKeys.FIRST_DAY_OF_WEEK);
2832
+ return this.firstDayOfWeek() || this.getTranslation(TranslationKeys.FIRST_DAY_OF_WEEK);
2833
2833
  }
2834
2834
  // Ported from jquery-ui datepicker formatDate
2835
2835
  formatDate(date, format) {
@@ -2890,7 +2890,7 @@ class DatePicker extends BaseInput {
2890
2890
  formattedDate += date.getTime();
2891
2891
  break;
2892
2892
  case '!':
2893
- formattedDate += date.getTime() * 10000 + this.ticksTo1970;
2893
+ formattedDate += date.getTime() * 10000 + this.ticksTo1970();
2894
2894
  break;
2895
2895
  case "'":
2896
2896
  if (lookAhead("'")) {
@@ -2916,10 +2916,10 @@ class DatePicker extends BaseInput {
2916
2916
  let hours = date.getHours();
2917
2917
  let minutes = date.getMinutes();
2918
2918
  let seconds = date.getSeconds();
2919
- if (this.hourFormat == '12' && hours > 11 && hours != 12) {
2919
+ if (this.hourFormat() == '12' && hours > 11 && hours != 12) {
2920
2920
  hours -= 12;
2921
2921
  }
2922
- if (this.hourFormat == '12') {
2922
+ if (this.hourFormat() == '12') {
2923
2923
  formattedTime += hours === 0 ? 12 : hours < 10 ? '0' + hours : hours;
2924
2924
  }
2925
2925
  else {
@@ -2927,33 +2927,33 @@ class DatePicker extends BaseInput {
2927
2927
  }
2928
2928
  formattedTime += ':';
2929
2929
  formattedTime += minutes < 10 ? '0' + minutes : minutes;
2930
- if (this.showSeconds) {
2930
+ if (this.showSeconds()) {
2931
2931
  formattedTime += ':';
2932
2932
  formattedTime += seconds < 10 ? '0' + seconds : seconds;
2933
2933
  }
2934
- if (this.hourFormat == '12') {
2934
+ if (this.hourFormat() == '12') {
2935
2935
  formattedTime += date.getHours() > 11 ? ' PM' : ' AM';
2936
2936
  }
2937
2937
  return formattedTime;
2938
2938
  }
2939
2939
  parseTime(value) {
2940
2940
  let tokens = value.split(':');
2941
- let validTokenLength = this.showSeconds ? 3 : 2;
2941
+ let validTokenLength = this.showSeconds() ? 3 : 2;
2942
2942
  if (tokens.length !== validTokenLength) {
2943
2943
  throw 'Invalid time';
2944
2944
  }
2945
2945
  let h = parseInt(tokens[0]);
2946
2946
  let m = parseInt(tokens[1]);
2947
- let s = this.showSeconds ? parseInt(tokens[2]) : null;
2948
- if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat == '12' && h > 12) || (this.showSeconds && (isNaN(s) || s > 59))) {
2947
+ let s = this.showSeconds() ? parseInt(tokens[2]) : null;
2948
+ if (isNaN(h) || isNaN(m) || h > 23 || m > 59 || (this.hourFormat() == '12' && h > 12) || (this.showSeconds() && (isNaN(s) || s > 59))) {
2949
2949
  throw 'Invalid time';
2950
2950
  }
2951
2951
  else {
2952
- if (this.hourFormat == '12') {
2953
- if (h !== 12 && this.pm) {
2952
+ if (this.hourFormat() == '12') {
2953
+ if (h !== 12 && this.pm()) {
2954
2954
  h += 12;
2955
2955
  }
2956
- else if (!this.pm && h === 12) {
2956
+ else if (!this.pm() && h === 12) {
2957
2957
  h -= 12;
2958
2958
  }
2959
2959
  }
@@ -2969,7 +2969,7 @@ class DatePicker extends BaseInput {
2969
2969
  if (value === '') {
2970
2970
  return null;
2971
2971
  }
2972
- let iFormat, dim, extra, iValue = 0, shortYearCutoff = typeof this.shortYearCutoff !== 'string' ? this.shortYearCutoff : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff, 10), year = -1, month = -1, day = -1, doy = -1, literal = false, date, lookAhead = (match) => {
2972
+ let iFormat, dim, extra, iValue = 0, shortYearCutoff = typeof this.shortYearCutoff() !== 'string' ? this.shortYearCutoff() : (new Date().getFullYear() % 100) + parseInt(this.shortYearCutoff(), 10), year = -1, month = -1, day = -1, doy = -1, literal = false, date, lookAhead = (match) => {
2973
2973
  let matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
2974
2974
  if (matches) {
2975
2975
  iFormat++;
@@ -3012,7 +3012,7 @@ class DatePicker extends BaseInput {
3012
3012
  }
3013
3013
  iValue++;
3014
3014
  };
3015
- if (this.view === 'month') {
3015
+ if (this.view() === 'month') {
3016
3016
  day = 1;
3017
3017
  }
3018
3018
  for (iFormat = 0; iFormat < format.length; iFormat++) {
@@ -3051,7 +3051,7 @@ class DatePicker extends BaseInput {
3051
3051
  day = date.getDate();
3052
3052
  break;
3053
3053
  case '!':
3054
- date = new Date((getNumber('!') - this.ticksTo1970) / 10000);
3054
+ date = new Date((getNumber('!') - this.ticksTo1970()) / 10000);
3055
3055
  year = date.getFullYear();
3056
3056
  month = date.getMonth() + 1;
3057
3057
  day = date.getDate();
@@ -3093,7 +3093,7 @@ class DatePicker extends BaseInput {
3093
3093
  day -= dim;
3094
3094
  } while (true);
3095
3095
  }
3096
- if (this.view === 'year') {
3096
+ if (this.view() === 'year') {
3097
3097
  month = month === -1 ? 1 : month;
3098
3098
  day = day === -1 ? 1 : day;
3099
3099
  }
@@ -3111,10 +3111,10 @@ class DatePicker extends BaseInput {
3111
3111
  return date;
3112
3112
  }
3113
3113
  isValidDateForTimeConstraints(selectedDate) {
3114
- if (this.keepInvalid) {
3114
+ if (this.keepInvalid()) {
3115
3115
  return true; // If we are keeping invalid dates, we don't need to check for time constraints
3116
3116
  }
3117
- return (!this.minDate || selectedDate >= this.minDate) && (!this.maxDate || selectedDate <= this.maxDate);
3117
+ return (!this.minDate() || selectedDate >= this.minDate()) && (!this.maxDate() || selectedDate <= this.maxDate());
3118
3118
  }
3119
3119
  onTodayButtonClick(event) {
3120
3120
  const date = new Date();
@@ -3122,7 +3122,7 @@ class DatePicker extends BaseInput {
3122
3122
  day: date.getDate(),
3123
3123
  month: date.getMonth(),
3124
3124
  year: date.getFullYear(),
3125
- otherMonth: date.getMonth() !== this.currentMonth || date.getFullYear() !== this.currentYear,
3125
+ otherMonth: date.getMonth() !== this.currentMonth() || date.getFullYear() !== this.currentYear(),
3126
3126
  today: true,
3127
3127
  selectable: true
3128
3128
  };
@@ -3137,16 +3137,16 @@ class DatePicker extends BaseInput {
3137
3137
  this.onClearClick.emit(event);
3138
3138
  }
3139
3139
  createResponsiveStyle() {
3140
- if (this.numberOfMonths > 1 && this.responsiveOptions) {
3141
- if (!this.responsiveStyleElement) {
3142
- this.responsiveStyleElement = this.renderer.createElement('style');
3143
- this.responsiveStyleElement.type = 'text/css';
3144
- setAttribute(this.responsiveStyleElement, 'nonce', this.config?.csp()?.nonce);
3145
- this.renderer.appendChild(this.document.body, this.responsiveStyleElement);
3140
+ if (this.numberOfMonths() > 1 && this.responsiveOptions()) {
3141
+ if (!this.responsiveStyleElement()) {
3142
+ this.responsiveStyleElement.set(this.renderer.createElement('style'));
3143
+ this.responsiveStyleElement().type = 'text/css';
3144
+ setAttribute(this.responsiveStyleElement(), 'nonce', this.config?.csp()?.nonce);
3145
+ this.renderer.appendChild(this.document.body, this.responsiveStyleElement());
3146
3146
  }
3147
3147
  let innerHTML = '';
3148
- if (this.responsiveOptions) {
3149
- let responsiveOptions = [...this.responsiveOptions].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
3148
+ if (this.responsiveOptions()) {
3149
+ let responsiveOptions = [...this.responsiveOptions()].filter((o) => !!(o.breakpoint && o.numMonths)).sort((o1, o2) => -1 * o1.breakpoint.localeCompare(o2.breakpoint, undefined, { numeric: true }));
3150
3150
  for (let i = 0; i < responsiveOptions.length; i++) {
3151
3151
  let { breakpoint, numMonths } = responsiveOptions[i];
3152
3152
  let styles = `
@@ -3154,7 +3154,7 @@ class DatePicker extends BaseInput {
3154
3154
  display: inline-flex !important;
3155
3155
  }
3156
3156
  `;
3157
- for (let j = numMonths; j < this.numberOfMonths; j++) {
3157
+ for (let j = numMonths; j < this.numberOfMonths(); j++) {
3158
3158
  styles += `
3159
3159
  .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${j + 1}) {
3160
3160
  display: none !important;
@@ -3168,84 +3168,83 @@ class DatePicker extends BaseInput {
3168
3168
  `;
3169
3169
  }
3170
3170
  }
3171
- this.responsiveStyleElement.innerHTML = innerHTML;
3172
- setAttribute(this.responsiveStyleElement, 'nonce', this.config?.csp()?.nonce);
3171
+ this.responsiveStyleElement().innerHTML = innerHTML;
3172
+ setAttribute(this.responsiveStyleElement(), 'nonce', this.config?.csp()?.nonce);
3173
3173
  }
3174
3174
  }
3175
3175
  destroyResponsiveStyleElement() {
3176
- if (this.responsiveStyleElement) {
3177
- this.responsiveStyleElement.remove();
3178
- this.responsiveStyleElement = null;
3176
+ if (this.responsiveStyleElement()) {
3177
+ this.responsiveStyleElement().remove();
3178
+ this.responsiveStyleElement.set(null);
3179
3179
  }
3180
3180
  }
3181
3181
  bindDocumentClickListener() {
3182
- if (!this.documentClickListener) {
3182
+ if (!this.documentClickListener()) {
3183
3183
  this.zone.runOutsideAngular(() => {
3184
3184
  const documentTarget = this.el ? this.el.nativeElement.ownerDocument : this.document;
3185
- this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', (event) => {
3186
- if (this.isOutsideClicked(event) && this.overlayVisible) {
3185
+ this.documentClickListener.set(this.renderer.listen(documentTarget, 'mousedown', (event) => {
3186
+ if (this.isOutsideClicked(event) && this.overlayVisible()) {
3187
3187
  this.zone.run(() => {
3188
3188
  this.hideOverlay();
3189
3189
  this.onClickOutside.emit(event);
3190
- this.cd.markForCheck();
3191
3190
  });
3192
3191
  }
3193
- });
3192
+ }));
3194
3193
  });
3195
3194
  }
3196
3195
  }
3197
3196
  unbindDocumentClickListener() {
3198
- if (this.documentClickListener) {
3199
- this.documentClickListener();
3200
- this.documentClickListener = null;
3197
+ if (this.documentClickListener()) {
3198
+ this.documentClickListener()();
3199
+ this.documentClickListener.set(null);
3201
3200
  }
3202
3201
  }
3203
3202
  bindDocumentResizeListener() {
3204
- if (!this.documentResizeListener && !this.touchUI) {
3205
- this.documentResizeListener = this.renderer.listen(this.window, 'resize', this.onWindowResize.bind(this));
3203
+ if (!this.documentResizeListener() && !this.touchUI()) {
3204
+ this.documentResizeListener.set(this.renderer.listen(this.window, 'resize', this.onWindowResize.bind(this)));
3206
3205
  }
3207
3206
  }
3208
3207
  unbindDocumentResizeListener() {
3209
- if (this.documentResizeListener) {
3210
- this.documentResizeListener();
3211
- this.documentResizeListener = null;
3208
+ if (this.documentResizeListener()) {
3209
+ this.documentResizeListener()();
3210
+ this.documentResizeListener.set(null);
3212
3211
  }
3213
3212
  }
3214
3213
  bindScrollListener() {
3215
- if (!this.scrollHandler) {
3216
- this.scrollHandler = new ConnectedOverlayScrollHandler(this.el?.nativeElement, () => {
3217
- if (this.overlayVisible) {
3214
+ if (!this.scrollHandler()) {
3215
+ this.scrollHandler.set(new ConnectedOverlayScrollHandler(this.el?.nativeElement, () => {
3216
+ if (this.overlayVisible()) {
3218
3217
  this.hideOverlay();
3219
3218
  }
3220
- });
3219
+ }));
3221
3220
  }
3222
- this.scrollHandler.bindScrollListener();
3221
+ this.scrollHandler().bindScrollListener();
3223
3222
  }
3224
3223
  unbindScrollListener() {
3225
- if (this.scrollHandler) {
3226
- this.scrollHandler.unbindScrollListener();
3224
+ if (this.scrollHandler()) {
3225
+ this.scrollHandler().unbindScrollListener();
3227
3226
  }
3228
3227
  }
3229
3228
  isOutsideClicked(event) {
3230
- return !(this.el.nativeElement.isSameNode(event.target) || this.isNavIconClicked(event) || this.el.nativeElement.contains(event.target) || (this.overlay && this.overlay.contains(event.target)));
3229
+ return !(this.el.nativeElement.isSameNode(event.target) || this.isNavIconClicked(event) || this.el.nativeElement.contains(event.target) || (this.overlay() && this.overlay().contains(event.target)));
3231
3230
  }
3232
3231
  isNavIconClicked(event) {
3233
3232
  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');
3234
3233
  }
3235
3234
  onWindowResize() {
3236
- if (this.overlayVisible && !isTouchDevice()) {
3235
+ if (this.overlayVisible() && !isTouchDevice()) {
3237
3236
  this.hideOverlay();
3238
3237
  }
3239
3238
  }
3240
3239
  onOverlayHide() {
3241
- this.currentView = this.view;
3242
- if (this.mask) {
3240
+ this.currentView.set(this.view());
3241
+ if (this.mask()) {
3243
3242
  this.destroyMask();
3244
3243
  }
3245
3244
  this.unbindDocumentClickListener();
3246
3245
  this.unbindDocumentResizeListener();
3247
3246
  this.unbindScrollListener();
3248
- this.overlay = null;
3247
+ this.overlay.set(null);
3249
3248
  }
3250
3249
  /**
3251
3250
  * @override
@@ -3254,31 +3253,30 @@ class DatePicker extends BaseInput {
3254
3253
  * Writes the value to the control.
3255
3254
  */
3256
3255
  writeControlValue(value) {
3257
- this.value = value;
3258
- if (this.value && typeof this.value === 'string') {
3256
+ this.value.set(value);
3257
+ if (this.value() && typeof this.value() === 'string') {
3259
3258
  try {
3260
- this.value = this.parseValueFromString(this.value);
3259
+ this.value.set(this.parseValueFromString(this.value()));
3261
3260
  }
3262
3261
  catch {
3263
- if (this.keepInvalid) {
3264
- this.value = value;
3262
+ if (this.keepInvalid()) {
3263
+ this.value.set(value);
3265
3264
  }
3266
3265
  }
3267
3266
  }
3268
3267
  this.updateInputfield();
3269
3268
  this.updateUI();
3270
- this.cd.markForCheck();
3271
3269
  }
3272
3270
  onDestroy() {
3273
- if (this.scrollHandler) {
3274
- this.scrollHandler.destroy();
3275
- this.scrollHandler = null;
3271
+ if (this.scrollHandler()) {
3272
+ this.scrollHandler().destroy();
3273
+ this.scrollHandler.set(null);
3276
3274
  }
3277
- if (this.translationSubscription) {
3278
- this.translationSubscription.unsubscribe();
3275
+ if (this.translationSubscription()) {
3276
+ this.translationSubscription().unsubscribe();
3279
3277
  }
3280
- if (this.overlay && this.autoZIndex) {
3281
- ZIndexUtils.clear(this.overlay);
3278
+ if (this.overlay() && this.autoZIndex()) {
3279
+ ZIndexUtils.clear(this.overlay());
3282
3280
  }
3283
3281
  this.destroyResponsiveStyleElement();
3284
3282
  this.clearTimePickerTimer();
@@ -3286,8 +3284,8 @@ class DatePicker extends BaseInput {
3286
3284
  this.onOverlayHide();
3287
3285
  }
3288
3286
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
3289
- 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: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, iconAriaLabel: { classPropertyName: "iconAriaLabel", publicName: "iconAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: false, isRequired: false, transformFunction: null }, multipleSeparator: { classPropertyName: "multipleSeparator", publicName: "multipleSeparator", isSignal: false, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: false, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showOtherMonths: { classPropertyName: "showOtherMonths", publicName: "showOtherMonths", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOtherMonths: { classPropertyName: "selectOtherMonths", publicName: "selectOtherMonths", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, shortYearCutoff: { classPropertyName: "shortYearCutoff", publicName: "shortYearCutoff", isSignal: false, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: false, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: false, isRequired: false, transformFunction: numberAttribute }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: false, isRequired: false, transformFunction: numberAttribute }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: false, isRequired: false, transformFunction: numberAttribute }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "showOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showWeek: { classPropertyName: "showWeek", publicName: "showWeek", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, startWeekFromFirstDayOfYear: { classPropertyName: "startWeekFromFirstDayOfYear", publicName: "startWeekFromFirstDayOfYear", isSignal: false, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dataType: { classPropertyName: "dataType", publicName: "dataType", isSignal: false, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: false, isRequired: false, transformFunction: null }, maxDateCount: { classPropertyName: "maxDateCount", publicName: "maxDateCount", isSignal: false, isRequired: false, transformFunction: numberAttribute }, showButtonBar: { classPropertyName: "showButtonBar", publicName: "showButtonBar", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, todayButtonStyleClass: { classPropertyName: "todayButtonStyleClass", publicName: "todayButtonStyleClass", isSignal: false, isRequired: false, transformFunction: null }, clearButtonStyleClass: { classPropertyName: "clearButtonStyleClass", publicName: "clearButtonStyleClass", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: false, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: false, isRequired: false, transformFunction: null }, keepInvalid: { classPropertyName: "keepInvalid", publicName: "keepInvalid", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, hideOnDateTimeSelect: { classPropertyName: "hideOnDateTimeSelect", publicName: "hideOnDateTimeSelect", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, touchUI: { classPropertyName: "touchUI", publicName: "touchUI", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, timeSeparator: { classPropertyName: "timeSeparator", publicName: "timeSeparator", isSignal: false, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: false, isRequired: false, transformFunction: null }, disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: false, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: false, isRequired: false, transformFunction: null }, responsiveOptions: { classPropertyName: "responsiveOptions", publicName: "responsiveOptions", isSignal: false, isRequired: false, transformFunction: null }, numberOfMonths: { classPropertyName: "numberOfMonths", publicName: "numberOfMonths", isSignal: false, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: false, isRequired: false, transformFunction: null }, defaultDate: { classPropertyName: "defaultDate", publicName: "defaultDate", isSignal: false, 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": "cn(cx('root'), styleClass)", "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: "content", first: true, predicate: ["contentWrapper"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
3290
- <ng-template [ngIf]="!inline">
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: `
3288
+ <ng-template [ngIf]="!inline()">
3291
3289
  <input
3292
3290
  #inputfield
3293
3291
  pInputText
@@ -3296,75 +3294,75 @@ class DatePicker extends BaseInput {
3296
3294
  [attr.size]="inputSize()"
3297
3295
  type="text"
3298
3296
  role="combobox"
3299
- [attr.id]="inputId"
3297
+ [attr.id]="inputId()"
3300
3298
  [attr.name]="name()"
3301
3299
  [attr.aria-required]="required()"
3302
3300
  aria-autocomplete="none"
3303
3301
  aria-haspopup="dialog"
3304
- [attr.aria-expanded]="overlayVisible ?? false"
3305
- [attr.aria-controls]="overlayVisible ? panelId : null"
3306
- [attr.aria-labelledby]="ariaLabelledBy"
3307
- [attr.aria-label]="ariaLabel"
3308
- [value]="inputFieldValue"
3302
+ [attr.aria-expanded]="overlayVisible() ?? false"
3303
+ [attr.aria-controls]="overlayVisible() ? panelId : null"
3304
+ [attr.aria-labelledby]="ariaLabelledBy()"
3305
+ [attr.aria-label]="ariaLabel()"
3306
+ [value]="inputFieldValue()"
3309
3307
  (focus)="onInputFocus($event)"
3310
3308
  (keydown)="onInputKeydown($event)"
3311
3309
  (click)="onInputClick()"
3312
3310
  (blur)="onInputBlur($event)"
3313
3311
  [attr.required]="required() ? '' : undefined"
3314
- [attr.readonly]="readonlyInput ? '' : undefined"
3312
+ [attr.readonly]="readonlyInput() ? '' : undefined"
3315
3313
  [attr.disabled]="$disabled() ? '' : undefined"
3316
3314
  (input)="onUserInput($event)"
3317
- [ngStyle]="inputStyle"
3318
- [class]="cn(cx('pcInputText'), inputStyleClass)"
3319
- [attr.placeholder]="placeholder"
3320
- [attr.tabindex]="tabindex"
3321
- [attr.inputmode]="touchUI ? 'off' : null"
3315
+ [ngStyle]="inputStyle()"
3316
+ [class]="cn(cx('pcInputText'), inputStyleClass())"
3317
+ [attr.placeholder]="placeholder()"
3318
+ [attr.tabindex]="tabindex()"
3319
+ [attr.inputmode]="touchUI() ? 'off' : null"
3322
3320
  autocomplete="off"
3323
- [pAutoFocus]="autofocus"
3321
+ [pAutoFocus]="autofocus()"
3324
3322
  [variant]="$variant()"
3325
3323
  [fluid]="hasFluid"
3326
3324
  [invalid]="invalid()"
3327
3325
  [pt]="ptm('pcInputText')"
3328
3326
  [unstyled]="unstyled()"
3329
3327
  />
3330
- <ng-container *ngIf="showClear && !$disabled() && inputfieldViewChild()?.nativeElement?.value">
3331
- <svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()" />
3332
- <span *ngIf="clearIconTemplate() || _clearIconTemplate" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()">
3333
- <ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
3328
+ <ng-container *ngIf="showClear() && !$disabled() && inputfieldViewChild()?.nativeElement?.value">
3329
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate()" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()" />
3330
+ <span *ngIf="clearIconTemplate() || _clearIconTemplate()" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()">
3331
+ <ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
3334
3332
  </span>
3335
3333
  </ng-container>
3336
3334
  <button
3337
3335
  type="button"
3338
3336
  [attr.aria-label]="iconButtonAriaLabel"
3339
3337
  aria-haspopup="dialog"
3340
- [attr.aria-expanded]="overlayVisible ?? false"
3341
- [attr.aria-controls]="overlayVisible ? panelId : null"
3342
- *ngIf="showIcon && iconDisplay === 'button'"
3338
+ [attr.aria-expanded]="overlayVisible() ?? false"
3339
+ [attr.aria-controls]="overlayVisible() ? panelId : null"
3340
+ *ngIf="showIcon() && iconDisplay() === 'button'"
3343
3341
  (click)="onButtonClick($event, inputfield)"
3344
3342
  [class]="cx('dropdown')"
3345
3343
  [disabled]="$disabled()"
3346
3344
  tabindex="0"
3347
3345
  [pBind]="ptm('dropdown')"
3348
3346
  >
3349
- <span *ngIf="icon" [ngClass]="icon" [pBind]="ptm('dropdownIcon')"></span>
3350
- <ng-container *ngIf="!icon">
3351
- <svg data-p-icon="calendar" *ngIf="!triggerIconTemplate() && !_triggerIconTemplate" [pBind]="ptm('dropdownIcon')" />
3352
- <ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate"></ng-template>
3347
+ <span *ngIf="icon()" [ngClass]="icon()" [pBind]="ptm('dropdownIcon')"></span>
3348
+ <ng-container *ngIf="!icon()">
3349
+ <svg data-p-icon="calendar" *ngIf="!triggerIconTemplate() && !_triggerIconTemplate()" [pBind]="ptm('dropdownIcon')" />
3350
+ <ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate()"></ng-template>
3353
3351
  </ng-container>
3354
3352
  </button>
3355
- <ng-container *ngIf="iconDisplay === 'input' && showIcon">
3353
+ <ng-container *ngIf="iconDisplay() === 'input' && showIcon()">
3356
3354
  <span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
3357
- <svg data-p-icon="calendar" (click)="onButtonClick($event)" *ngIf="!inputIconTemplate() && !_inputIconTemplate" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
3355
+ <svg data-p-icon="calendar" (click)="onButtonClick($event)" *ngIf="!inputIconTemplate() && !_inputIconTemplate()" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
3358
3356
 
3359
- <ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate; context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
3357
+ <ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
3360
3358
  </span>
3361
3359
  </ng-container>
3362
3360
  </ng-template>
3363
3361
  <p-motion
3364
- *ngIf="inline || overlayVisible || overlay"
3365
- [visible]="inline || overlayVisible"
3362
+ *ngIf="inline() || overlayVisible() || overlay()"
3363
+ [visible]="inline() || overlayVisible()"
3366
3364
  name="p-anchored-overlay"
3367
- [appear]="!inline"
3365
+ [appear]="!inline()"
3368
3366
  [options]="computedMotionOptions()"
3369
3367
  (onBeforeEnter)="onOverlayBeforeEnter($event)"
3370
3368
  (onAfterLeave)="onOverlayAfterLeave($event)"
@@ -3372,19 +3370,19 @@ class DatePicker extends BaseInput {
3372
3370
  <div
3373
3371
  #contentWrapper
3374
3372
  [attr.id]="panelId"
3375
- [ngStyle]="panelStyle"
3376
- [class]="cn(cx('panel'), panelStyleClass)"
3373
+ [ngStyle]="panelStyle()"
3374
+ [class]="cn(cx('panel'), panelStyleClass())"
3377
3375
  [attr.aria-label]="getTranslation('chooseDate')"
3378
- [attr.role]="inline ? null : 'dialog'"
3379
- [attr.aria-modal]="inline ? null : 'true'"
3376
+ [attr.role]="inline() ? null : 'dialog'"
3377
+ [attr.aria-modal]="inline() ? null : 'true'"
3380
3378
  (click)="onOverlayClick($event)"
3381
3379
  [pBind]="ptm('panel')"
3382
3380
  >
3383
3381
  <ng-content select="p-header"></ng-content>
3384
- <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
3385
- <ng-container *ngIf="!timeOnly">
3382
+ <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
3383
+ <ng-container *ngIf="!timeOnly()">
3386
3384
  <div [class]="cx('calendarContainer')" [pBind]="ptm('calendarContainer')">
3387
- <div [class]="cx('calendar')" *ngFor="let month of months; let i = index" [pBind]="ptm('calendar')">
3385
+ <div [class]="cx('calendar')" *ngFor="let month of months(); let i = index" [pBind]="ptm('calendar')">
3388
3386
  <div [class]="cx('header')" [pBind]="ptm('header')">
3389
3387
  <p-button
3390
3388
  rounded
@@ -3400,15 +3398,15 @@ class DatePicker extends BaseInput {
3400
3398
  [attr.data-pc-group-section]="'navigator'"
3401
3399
  >
3402
3400
  <ng-template #icon>
3403
- <svg data-p-icon="chevron-left" *ngIf="!previousIconTemplate() && !_previousIconTemplate" />
3404
- <span *ngIf="previousIconTemplate() || _previousIconTemplate">
3405
- <ng-template *ngTemplateOutlet="previousIconTemplate() || _previousIconTemplate"></ng-template>
3401
+ <svg data-p-icon="chevron-left" *ngIf="!previousIconTemplate() && !_previousIconTemplate()" />
3402
+ <span *ngIf="previousIconTemplate() || _previousIconTemplate()">
3403
+ <ng-template *ngTemplateOutlet="previousIconTemplate() || _previousIconTemplate()"></ng-template>
3406
3404
  </span>
3407
3405
  </ng-template>
3408
3406
  </p-button>
3409
3407
  <div [class]="cx('title')" [pBind]="ptm('title')">
3410
3408
  <button
3411
- *ngIf="currentView === 'date'"
3409
+ *ngIf="currentView() === 'date'"
3412
3410
  type="button"
3413
3411
  (click)="switchToMonthView($event)"
3414
3412
  (keydown)="onContainerButtonKeydown($event)"
@@ -3422,7 +3420,7 @@ class DatePicker extends BaseInput {
3422
3420
  {{ getMonthName(month.month) }}
3423
3421
  </button>
3424
3422
  <button
3425
- *ngIf="currentView !== 'year'"
3423
+ *ngIf="currentView() !== 'year'"
3426
3424
  type="button"
3427
3425
  (click)="switchToYearView($event)"
3428
3426
  (keydown)="onContainerButtonKeydown($event)"
@@ -3435,9 +3433,9 @@ class DatePicker extends BaseInput {
3435
3433
  >
3436
3434
  {{ getYear(month) }}
3437
3435
  </button>
3438
- <span [class]="cx('decade')" *ngIf="currentView === 'year'" [pBind]="ptm('decade')">
3439
- <ng-container *ngIf="!decadeTemplate() && !_decadeTemplate">{{ yearPickerValues()[0] }} - {{ yearPickerValues()[yearPickerValues().length - 1] }}</ng-container>
3440
- <ng-container *ngTemplateOutlet="decadeTemplate() || _decadeTemplate; context: { $implicit: yearPickerValues }"></ng-container>
3436
+ <span [class]="cx('decade')" *ngIf="currentView() === 'year'" [pBind]="ptm('decade')">
3437
+ <ng-container *ngIf="!decadeTemplate() && !_decadeTemplate()">{{ yearPickerValues()[0] }} - {{ yearPickerValues()[yearPickerValues().length - 1] }}</ng-container>
3438
+ <ng-container *ngTemplateOutlet="decadeTemplate() || _decadeTemplate(); context: { $implicit: yearPickerValues }"></ng-container>
3441
3439
  </span>
3442
3440
  </div>
3443
3441
  <p-button
@@ -3447,39 +3445,39 @@ class DatePicker extends BaseInput {
3447
3445
  (keydown)="onContainerButtonKeydown($event)"
3448
3446
  [styleClass]="cx('pcNextButton')"
3449
3447
  (onClick)="onNextButtonClick($event)"
3450
- [ngStyle]="{ visibility: i === months.length - 1 ? 'visible' : 'hidden' }"
3448
+ [ngStyle]="{ visibility: i === months().length - 1 ? 'visible' : 'hidden' }"
3451
3449
  [ariaLabel]="nextIconAriaLabel"
3452
3450
  [pt]="ptm('pcNextButton')"
3453
3451
  [attr.data-pc-group-section]="'navigator'"
3454
3452
  >
3455
3453
  <ng-template #icon>
3456
- <svg data-p-icon="chevron-right" *ngIf="!nextIconTemplate() && !_nextIconTemplate" />
3457
- <ng-container *ngIf="nextIconTemplate() || _nextIconTemplate">
3458
- <ng-template *ngTemplateOutlet="nextIconTemplate() || _nextIconTemplate"></ng-template>
3454
+ <svg data-p-icon="chevron-right" *ngIf="!nextIconTemplate() && !_nextIconTemplate()" />
3455
+ <ng-container *ngIf="nextIconTemplate() || _nextIconTemplate()">
3456
+ <ng-template *ngTemplateOutlet="nextIconTemplate() || _nextIconTemplate()"></ng-template>
3459
3457
  </ng-container>
3460
3458
  </ng-template>
3461
3459
  </p-button>
3462
3460
  </div>
3463
- <table [class]="cx('dayView')" role="grid" *ngIf="currentView === 'date'" [pBind]="ptm('table')">
3461
+ <table [class]="cx('dayView')" role="grid" *ngIf="currentView() === 'date'" [pBind]="ptm('table')">
3464
3462
  <thead [pBind]="ptm('tableHeader')">
3465
3463
  <tr [pBind]="ptm('tableHeaderRow')">
3466
- <th *ngIf="showWeek" [class]="cx('weekHeader')" [pBind]="ptm('weekHeader')">
3464
+ <th *ngIf="showWeek()" [class]="cx('weekHeader')" [pBind]="ptm('weekHeader')">
3467
3465
  <span [pBind]="ptm('weekHeaderLabel')">{{ getTranslation('weekHeader') }}</span>
3468
3466
  </th>
3469
- <th [class]="cx('weekDayCell')" scope="col" *ngFor="let weekDay of weekDays; let begin = first; let end = last" [pBind]="ptm('weekDayCell')">
3467
+ <th [class]="cx('weekDayCell')" scope="col" *ngFor="let weekDay of weekDays(); let begin = first; let end = last" [pBind]="ptm('weekDayCell')">
3470
3468
  <span [class]="cx('weekDay')" [pBind]="ptm('weekDay')">{{ weekDay }}</span>
3471
3469
  </th>
3472
3470
  </tr>
3473
3471
  </thead>
3474
3472
  <tbody [pBind]="ptm('tableBody')">
3475
3473
  <tr *ngFor="let week of month.dates; let j = index" [pBind]="ptm('tableBodyRow')">
3476
- <td *ngIf="showWeek" [class]="cx('weekNumber')" [pBind]="ptm('weekNumber')">
3474
+ <td *ngIf="showWeek()" [class]="cx('weekNumber')" [pBind]="ptm('weekNumber')">
3477
3475
  <span [class]="cx('weekLabelContainer')" [pBind]="ptm('weekLabelContainer')">
3478
3476
  {{ month.weekNumbers[j] }}
3479
3477
  </span>
3480
3478
  </td>
3481
3479
  <td *ngFor="let date of week" [attr.aria-label]="date.day" [class]="cx('dayCell', { date })" [pBind]="ptm('dayCell')">
3482
- <ng-container *ngIf="date.otherMonth ? showOtherMonths : true">
3480
+ <ng-container *ngIf="date.otherMonth ? showOtherMonths() : true">
3483
3481
  <span
3484
3482
  [ngClass]="dayClass(date)"
3485
3483
  (click)="onDateSelect($event, date)"
@@ -3489,12 +3487,12 @@ class DatePicker extends BaseInput {
3489
3487
  pRipple
3490
3488
  [pBind]="ptm('day')"
3491
3489
  >
3492
- <ng-container *ngIf="!dateTemplate() && !_dateTemplate && (date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate))">{{ date.day }}</ng-container>
3493
- <ng-container *ngIf="date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate)">
3494
- <ng-container *ngTemplateOutlet="dateTemplate() || _dateTemplate; context: { $implicit: date }"></ng-container>
3490
+ <ng-container *ngIf="!dateTemplate() && !_dateTemplate() && (date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate()))">{{ date.day }}</ng-container>
3491
+ <ng-container *ngIf="date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate())">
3492
+ <ng-container *ngTemplateOutlet="dateTemplate() || _dateTemplate(); context: { $implicit: date }"></ng-container>
3495
3493
  </ng-container>
3496
3494
  <ng-container *ngIf="!date.selectable">
3497
- <ng-container *ngTemplateOutlet="disabledDateTemplate() || _disabledDateTemplate; context: { $implicit: date }"></ng-container>
3495
+ <ng-container *ngTemplateOutlet="disabledDateTemplate() || _disabledDateTemplate(); context: { $implicit: date }"></ng-container>
3498
3496
  </ng-container>
3499
3497
  </span>
3500
3498
  <div *ngIf="isSelected(date)" class="p-hidden-accessible" aria-live="polite">
@@ -3507,7 +3505,7 @@ class DatePicker extends BaseInput {
3507
3505
  </table>
3508
3506
  </div>
3509
3507
  </div>
3510
- <div [class]="cx('monthView')" *ngIf="currentView === 'month'" [pBind]="ptm('monthView')">
3508
+ <div [class]="cx('monthView')" *ngIf="currentView() === 'month'" [pBind]="ptm('monthView')">
3511
3509
  <span *ngFor="let m of monthPickerValues(); let i = index" (click)="onMonthSelect($event, i)" (keydown)="onMonthCellKeydown($event, i)" [class]="cx('month', { month: m, index: i })" pRipple [pBind]="ptm('month')">
3512
3510
  {{ m }}
3513
3511
  <div *ngIf="isMonthSelected(i)" class="p-hidden-accessible" aria-live="polite">
@@ -3515,7 +3513,7 @@ class DatePicker extends BaseInput {
3515
3513
  </div>
3516
3514
  </span>
3517
3515
  </div>
3518
- <div [class]="cx('yearView')" *ngIf="currentView === 'year'" [pBind]="ptm('yearView')">
3516
+ <div [class]="cx('yearView')" *ngIf="currentView() === 'year'" [pBind]="ptm('yearView')">
3519
3517
  <span *ngFor="let y of yearPickerValues()" (click)="onYearSelect($event, y)" (keydown)="onYearCellKeydown($event, y)" [class]="cx('year', { year: y })" pRipple [pBind]="ptm('year')">
3520
3518
  {{ y }}
3521
3519
  <div *ngIf="isYearSelected(y)" class="p-hidden-accessible" aria-live="polite">
@@ -3524,7 +3522,7 @@ class DatePicker extends BaseInput {
3524
3522
  </span>
3525
3523
  </div>
3526
3524
  </ng-container>
3527
- <div [class]="cx('timePicker')" *ngIf="(showTime || timeOnly) && currentView === 'date'" [pBind]="ptm('timePicker')">
3525
+ <div [class]="cx('timePicker')" *ngIf="(showTime() || timeOnly()) && currentView() === 'date'" [pBind]="ptm('timePicker')">
3528
3526
  <div [class]="cx('hourPicker')" [pBind]="ptm('hourPicker')">
3529
3527
  <p-button
3530
3528
  rounded
@@ -3544,11 +3542,11 @@ class DatePicker extends BaseInput {
3544
3542
  [attr.data-pc-group-section]="'timepickerbutton'"
3545
3543
  >
3546
3544
  <ng-template #icon>
3547
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
3548
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
3545
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
3546
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
3549
3547
  </ng-template>
3550
3548
  </p-button>
3551
- <span [pBind]="ptm('hour')"><ng-container *ngIf="currentHour < 10">0</ng-container>{{ currentHour }}</span>
3549
+ <span [pBind]="ptm('hour')"><ng-container *ngIf="currentHour() < 10">0</ng-container>{{ currentHour() }}</span>
3552
3550
  <p-button
3553
3551
  rounded
3554
3552
  variant="text"
@@ -3567,13 +3565,13 @@ class DatePicker extends BaseInput {
3567
3565
  [attr.data-pc-group-section]="'timepickerbutton'"
3568
3566
  >
3569
3567
  <ng-template #icon>
3570
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
3571
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
3568
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
3569
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
3572
3570
  </ng-template>
3573
3571
  </p-button>
3574
3572
  </div>
3575
3573
  <div class="p-datepicker-separator" [pBind]="ptm('separatorContainer')">
3576
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
3574
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
3577
3575
  </div>
3578
3576
  <div [class]="cx('minutePicker')" [pBind]="ptm('minutePicker')">
3579
3577
  <p-button
@@ -3594,11 +3592,11 @@ class DatePicker extends BaseInput {
3594
3592
  [attr.data-pc-group-section]="'timepickerbutton'"
3595
3593
  >
3596
3594
  <ng-template #icon>
3597
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
3598
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
3595
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
3596
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
3599
3597
  </ng-template>
3600
3598
  </p-button>
3601
- <span [pBind]="ptm('minute')"><ng-container *ngIf="currentMinute < 10">0</ng-container>{{ currentMinute }}</span>
3599
+ <span [pBind]="ptm('minute')"><ng-container *ngIf="currentMinute() < 10">0</ng-container>{{ currentMinute() }}</span>
3602
3600
  <p-button
3603
3601
  rounded
3604
3602
  variant="text"
@@ -3617,15 +3615,15 @@ class DatePicker extends BaseInput {
3617
3615
  [attr.data-pc-group-section]="'timepickerbutton'"
3618
3616
  >
3619
3617
  <ng-template #icon>
3620
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
3621
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
3618
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
3619
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
3622
3620
  </ng-template>
3623
3621
  </p-button>
3624
3622
  </div>
3625
- <div [class]="cx('separator')" *ngIf="showSeconds" [pBind]="ptm('separatorContainer')">
3626
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
3623
+ <div [class]="cx('separator')" *ngIf="showSeconds()" [pBind]="ptm('separatorContainer')">
3624
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
3627
3625
  </div>
3628
- <div [class]="cx('secondPicker')" *ngIf="showSeconds" [pBind]="ptm('secondPicker')">
3626
+ <div [class]="cx('secondPicker')" *ngIf="showSeconds()" [pBind]="ptm('secondPicker')">
3629
3627
  <p-button
3630
3628
  rounded
3631
3629
  variant="text"
@@ -3644,11 +3642,11 @@ class DatePicker extends BaseInput {
3644
3642
  [attr.data-pc-group-section]="'timepickerbutton'"
3645
3643
  >
3646
3644
  <ng-template #icon>
3647
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
3648
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
3645
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
3646
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
3649
3647
  </ng-template>
3650
3648
  </p-button>
3651
- <span [pBind]="ptm('second')"><ng-container *ngIf="currentSecond < 10">0</ng-container>{{ currentSecond }}</span>
3649
+ <span [pBind]="ptm('second')"><ng-container *ngIf="currentSecond() < 10">0</ng-container>{{ currentSecond() }}</span>
3652
3650
  <p-button
3653
3651
  rounded
3654
3652
  variant="text"
@@ -3667,15 +3665,15 @@ class DatePicker extends BaseInput {
3667
3665
  [attr.data-pc-group-section]="'timepickerbutton'"
3668
3666
  >
3669
3667
  <ng-template #icon>
3670
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
3671
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
3668
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
3669
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
3672
3670
  </ng-template>
3673
3671
  </p-button>
3674
3672
  </div>
3675
- <div [class]="cx('separator')" *ngIf="hourFormat == '12'" [pBind]="ptm('separatorContainer')">
3676
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
3673
+ <div [class]="cx('separator')" *ngIf="hourFormat() == '12'" [pBind]="ptm('separatorContainer')">
3674
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
3677
3675
  </div>
3678
- <div [class]="cx('ampmPicker')" *ngIf="hourFormat == '12'" [pBind]="ptm('ampmPicker')">
3676
+ <div [class]="cx('ampmPicker')" *ngIf="hourFormat() == '12'" [pBind]="ptm('ampmPicker')">
3679
3677
  <p-button
3680
3678
  text
3681
3679
  rounded
@@ -3689,11 +3687,11 @@ class DatePicker extends BaseInput {
3689
3687
  [attr.data-pc-group-section]="'timepickerbutton'"
3690
3688
  >
3691
3689
  <ng-template #icon>
3692
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
3693
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
3690
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
3691
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
3694
3692
  </ng-template>
3695
3693
  </p-button>
3696
- <span [pBind]="ptm('ampm')">{{ pm ? 'PM' : 'AM' }}</span>
3694
+ <span [pBind]="ptm('ampm')">{{ pm() ? 'PM' : 'AM' }}</span>
3697
3695
  <p-button
3698
3696
  text
3699
3697
  rounded
@@ -3707,15 +3705,15 @@ class DatePicker extends BaseInput {
3707
3705
  [attr.data-pc-group-section]="'timepickerbutton'"
3708
3706
  >
3709
3707
  <ng-template #icon>
3710
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
3711
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
3708
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
3709
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
3712
3710
  </ng-template>
3713
3711
  </p-button>
3714
3712
  </div>
3715
3713
  </div>
3716
- <div [class]="cx('buttonbar')" *ngIf="showButtonBar" [pBind]="ptm('buttonbar')">
3717
- @if (buttonBarTemplate() || _buttonBarTemplate) {
3718
- <ng-container *ngTemplateOutlet="buttonBarTemplate() || _buttonBarTemplate; context: { todayCallback: onTodayButtonClick.bind(this), clearCallback: onClearButtonClick.bind(this) }"></ng-container>
3714
+ <div [class]="cx('buttonbar')" *ngIf="showButtonBar()" [pBind]="ptm('buttonbar')">
3715
+ @if (buttonBarTemplate() || _buttonBarTemplate()) {
3716
+ <ng-container *ngTemplateOutlet="buttonBarTemplate() || _buttonBarTemplate(); context: { todayCallback: onTodayButtonClick.bind(this), clearCallback: onClearButtonClick.bind(this) }"></ng-container>
3719
3717
  } @else {
3720
3718
  <p-button
3721
3719
  size="small"
@@ -3723,7 +3721,7 @@ class DatePicker extends BaseInput {
3723
3721
  [label]="getTranslation('today')"
3724
3722
  (keydown)="onContainerButtonKeydown($event)"
3725
3723
  (onClick)="onTodayButtonClick($event)"
3726
- [ngClass]="todayButtonStyleClass"
3724
+ [ngClass]="todayButtonStyleClass()"
3727
3725
  severity="secondary"
3728
3726
  variant="text"
3729
3727
  size="small"
@@ -3736,7 +3734,7 @@ class DatePicker extends BaseInput {
3736
3734
  [label]="getTranslation('clear')"
3737
3735
  (keydown)="onContainerButtonKeydown($event)"
3738
3736
  (onClick)="onClearButtonClick($event)"
3739
- [ngClass]="clearButtonStyleClass"
3737
+ [ngClass]="clearButtonStyleClass()"
3740
3738
  severity="secondary"
3741
3739
  variant="text"
3742
3740
  size="small"
@@ -3746,20 +3744,19 @@ class DatePicker extends BaseInput {
3746
3744
  }
3747
3745
  </div>
3748
3746
  <ng-content select="p-footer"></ng-content>
3749
- <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
3747
+ <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
3750
3748
  </div>
3751
3749
  </p-motion>
3752
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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", "badgeClass", "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 });
3750
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 });
3753
3751
  }
3754
3752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePicker, decorators: [{
3755
3753
  type: Component,
3756
3754
  args: [{
3757
3755
  selector: 'p-datePicker, p-datepicker, p-date-picker',
3758
- standalone: true,
3759
3756
  imports: [CommonModule, Button, Ripple, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronDownIcon, TimesIcon, CalendarIcon, AutoFocus, InputText, SharedModule, BindModule, MotionModule],
3760
3757
  hostDirectives: [Bind],
3761
3758
  template: `
3762
- <ng-template [ngIf]="!inline">
3759
+ <ng-template [ngIf]="!inline()">
3763
3760
  <input
3764
3761
  #inputfield
3765
3762
  pInputText
@@ -3768,75 +3765,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3768
3765
  [attr.size]="inputSize()"
3769
3766
  type="text"
3770
3767
  role="combobox"
3771
- [attr.id]="inputId"
3768
+ [attr.id]="inputId()"
3772
3769
  [attr.name]="name()"
3773
3770
  [attr.aria-required]="required()"
3774
3771
  aria-autocomplete="none"
3775
3772
  aria-haspopup="dialog"
3776
- [attr.aria-expanded]="overlayVisible ?? false"
3777
- [attr.aria-controls]="overlayVisible ? panelId : null"
3778
- [attr.aria-labelledby]="ariaLabelledBy"
3779
- [attr.aria-label]="ariaLabel"
3780
- [value]="inputFieldValue"
3773
+ [attr.aria-expanded]="overlayVisible() ?? false"
3774
+ [attr.aria-controls]="overlayVisible() ? panelId : null"
3775
+ [attr.aria-labelledby]="ariaLabelledBy()"
3776
+ [attr.aria-label]="ariaLabel()"
3777
+ [value]="inputFieldValue()"
3781
3778
  (focus)="onInputFocus($event)"
3782
3779
  (keydown)="onInputKeydown($event)"
3783
3780
  (click)="onInputClick()"
3784
3781
  (blur)="onInputBlur($event)"
3785
3782
  [attr.required]="required() ? '' : undefined"
3786
- [attr.readonly]="readonlyInput ? '' : undefined"
3783
+ [attr.readonly]="readonlyInput() ? '' : undefined"
3787
3784
  [attr.disabled]="$disabled() ? '' : undefined"
3788
3785
  (input)="onUserInput($event)"
3789
- [ngStyle]="inputStyle"
3790
- [class]="cn(cx('pcInputText'), inputStyleClass)"
3791
- [attr.placeholder]="placeholder"
3792
- [attr.tabindex]="tabindex"
3793
- [attr.inputmode]="touchUI ? 'off' : null"
3786
+ [ngStyle]="inputStyle()"
3787
+ [class]="cn(cx('pcInputText'), inputStyleClass())"
3788
+ [attr.placeholder]="placeholder()"
3789
+ [attr.tabindex]="tabindex()"
3790
+ [attr.inputmode]="touchUI() ? 'off' : null"
3794
3791
  autocomplete="off"
3795
- [pAutoFocus]="autofocus"
3792
+ [pAutoFocus]="autofocus()"
3796
3793
  [variant]="$variant()"
3797
3794
  [fluid]="hasFluid"
3798
3795
  [invalid]="invalid()"
3799
3796
  [pt]="ptm('pcInputText')"
3800
3797
  [unstyled]="unstyled()"
3801
3798
  />
3802
- <ng-container *ngIf="showClear && !$disabled() && inputfieldViewChild()?.nativeElement?.value">
3803
- <svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()" />
3804
- <span *ngIf="clearIconTemplate() || _clearIconTemplate" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()">
3805
- <ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
3799
+ <ng-container *ngIf="showClear() && !$disabled() && inputfieldViewChild()?.nativeElement?.value">
3800
+ <svg data-p-icon="times" *ngIf="!clearIconTemplate() && !_clearIconTemplate()" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()" />
3801
+ <span *ngIf="clearIconTemplate() || _clearIconTemplate()" [class]="cx('clearIcon')" [pBind]="ptm('inputIcon')" (click)="clear()">
3802
+ <ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
3806
3803
  </span>
3807
3804
  </ng-container>
3808
3805
  <button
3809
3806
  type="button"
3810
3807
  [attr.aria-label]="iconButtonAriaLabel"
3811
3808
  aria-haspopup="dialog"
3812
- [attr.aria-expanded]="overlayVisible ?? false"
3813
- [attr.aria-controls]="overlayVisible ? panelId : null"
3814
- *ngIf="showIcon && iconDisplay === 'button'"
3809
+ [attr.aria-expanded]="overlayVisible() ?? false"
3810
+ [attr.aria-controls]="overlayVisible() ? panelId : null"
3811
+ *ngIf="showIcon() && iconDisplay() === 'button'"
3815
3812
  (click)="onButtonClick($event, inputfield)"
3816
3813
  [class]="cx('dropdown')"
3817
3814
  [disabled]="$disabled()"
3818
3815
  tabindex="0"
3819
3816
  [pBind]="ptm('dropdown')"
3820
3817
  >
3821
- <span *ngIf="icon" [ngClass]="icon" [pBind]="ptm('dropdownIcon')"></span>
3822
- <ng-container *ngIf="!icon">
3823
- <svg data-p-icon="calendar" *ngIf="!triggerIconTemplate() && !_triggerIconTemplate" [pBind]="ptm('dropdownIcon')" />
3824
- <ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate"></ng-template>
3818
+ <span *ngIf="icon()" [ngClass]="icon()" [pBind]="ptm('dropdownIcon')"></span>
3819
+ <ng-container *ngIf="!icon()">
3820
+ <svg data-p-icon="calendar" *ngIf="!triggerIconTemplate() && !_triggerIconTemplate()" [pBind]="ptm('dropdownIcon')" />
3821
+ <ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate()"></ng-template>
3825
3822
  </ng-container>
3826
3823
  </button>
3827
- <ng-container *ngIf="iconDisplay === 'input' && showIcon">
3824
+ <ng-container *ngIf="iconDisplay() === 'input' && showIcon()">
3828
3825
  <span [class]="cx('inputIconContainer')" [pBind]="ptm('inputIconContainer')" [attr.data-p]="inputIconDataP">
3829
- <svg data-p-icon="calendar" (click)="onButtonClick($event)" *ngIf="!inputIconTemplate() && !_inputIconTemplate" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
3826
+ <svg data-p-icon="calendar" (click)="onButtonClick($event)" *ngIf="!inputIconTemplate() && !_inputIconTemplate()" [class]="cx('inputIcon')" [pBind]="ptm('inputIcon')" />
3830
3827
 
3831
- <ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate; context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
3828
+ <ng-container *ngTemplateOutlet="inputIconTemplate() || _inputIconTemplate(); context: { clickCallBack: onButtonClick.bind(this) }"></ng-container>
3832
3829
  </span>
3833
3830
  </ng-container>
3834
3831
  </ng-template>
3835
3832
  <p-motion
3836
- *ngIf="inline || overlayVisible || overlay"
3837
- [visible]="inline || overlayVisible"
3833
+ *ngIf="inline() || overlayVisible() || overlay()"
3834
+ [visible]="inline() || overlayVisible()"
3838
3835
  name="p-anchored-overlay"
3839
- [appear]="!inline"
3836
+ [appear]="!inline()"
3840
3837
  [options]="computedMotionOptions()"
3841
3838
  (onBeforeEnter)="onOverlayBeforeEnter($event)"
3842
3839
  (onAfterLeave)="onOverlayAfterLeave($event)"
@@ -3844,19 +3841,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3844
3841
  <div
3845
3842
  #contentWrapper
3846
3843
  [attr.id]="panelId"
3847
- [ngStyle]="panelStyle"
3848
- [class]="cn(cx('panel'), panelStyleClass)"
3844
+ [ngStyle]="panelStyle()"
3845
+ [class]="cn(cx('panel'), panelStyleClass())"
3849
3846
  [attr.aria-label]="getTranslation('chooseDate')"
3850
- [attr.role]="inline ? null : 'dialog'"
3851
- [attr.aria-modal]="inline ? null : 'true'"
3847
+ [attr.role]="inline() ? null : 'dialog'"
3848
+ [attr.aria-modal]="inline() ? null : 'true'"
3852
3849
  (click)="onOverlayClick($event)"
3853
3850
  [pBind]="ptm('panel')"
3854
3851
  >
3855
3852
  <ng-content select="p-header"></ng-content>
3856
- <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
3857
- <ng-container *ngIf="!timeOnly">
3853
+ <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
3854
+ <ng-container *ngIf="!timeOnly()">
3858
3855
  <div [class]="cx('calendarContainer')" [pBind]="ptm('calendarContainer')">
3859
- <div [class]="cx('calendar')" *ngFor="let month of months; let i = index" [pBind]="ptm('calendar')">
3856
+ <div [class]="cx('calendar')" *ngFor="let month of months(); let i = index" [pBind]="ptm('calendar')">
3860
3857
  <div [class]="cx('header')" [pBind]="ptm('header')">
3861
3858
  <p-button
3862
3859
  rounded
@@ -3872,15 +3869,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3872
3869
  [attr.data-pc-group-section]="'navigator'"
3873
3870
  >
3874
3871
  <ng-template #icon>
3875
- <svg data-p-icon="chevron-left" *ngIf="!previousIconTemplate() && !_previousIconTemplate" />
3876
- <span *ngIf="previousIconTemplate() || _previousIconTemplate">
3877
- <ng-template *ngTemplateOutlet="previousIconTemplate() || _previousIconTemplate"></ng-template>
3872
+ <svg data-p-icon="chevron-left" *ngIf="!previousIconTemplate() && !_previousIconTemplate()" />
3873
+ <span *ngIf="previousIconTemplate() || _previousIconTemplate()">
3874
+ <ng-template *ngTemplateOutlet="previousIconTemplate() || _previousIconTemplate()"></ng-template>
3878
3875
  </span>
3879
3876
  </ng-template>
3880
3877
  </p-button>
3881
3878
  <div [class]="cx('title')" [pBind]="ptm('title')">
3882
3879
  <button
3883
- *ngIf="currentView === 'date'"
3880
+ *ngIf="currentView() === 'date'"
3884
3881
  type="button"
3885
3882
  (click)="switchToMonthView($event)"
3886
3883
  (keydown)="onContainerButtonKeydown($event)"
@@ -3894,7 +3891,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3894
3891
  {{ getMonthName(month.month) }}
3895
3892
  </button>
3896
3893
  <button
3897
- *ngIf="currentView !== 'year'"
3894
+ *ngIf="currentView() !== 'year'"
3898
3895
  type="button"
3899
3896
  (click)="switchToYearView($event)"
3900
3897
  (keydown)="onContainerButtonKeydown($event)"
@@ -3907,9 +3904,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3907
3904
  >
3908
3905
  {{ getYear(month) }}
3909
3906
  </button>
3910
- <span [class]="cx('decade')" *ngIf="currentView === 'year'" [pBind]="ptm('decade')">
3911
- <ng-container *ngIf="!decadeTemplate() && !_decadeTemplate">{{ yearPickerValues()[0] }} - {{ yearPickerValues()[yearPickerValues().length - 1] }}</ng-container>
3912
- <ng-container *ngTemplateOutlet="decadeTemplate() || _decadeTemplate; context: { $implicit: yearPickerValues }"></ng-container>
3907
+ <span [class]="cx('decade')" *ngIf="currentView() === 'year'" [pBind]="ptm('decade')">
3908
+ <ng-container *ngIf="!decadeTemplate() && !_decadeTemplate()">{{ yearPickerValues()[0] }} - {{ yearPickerValues()[yearPickerValues().length - 1] }}</ng-container>
3909
+ <ng-container *ngTemplateOutlet="decadeTemplate() || _decadeTemplate(); context: { $implicit: yearPickerValues }"></ng-container>
3913
3910
  </span>
3914
3911
  </div>
3915
3912
  <p-button
@@ -3919,39 +3916,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3919
3916
  (keydown)="onContainerButtonKeydown($event)"
3920
3917
  [styleClass]="cx('pcNextButton')"
3921
3918
  (onClick)="onNextButtonClick($event)"
3922
- [ngStyle]="{ visibility: i === months.length - 1 ? 'visible' : 'hidden' }"
3919
+ [ngStyle]="{ visibility: i === months().length - 1 ? 'visible' : 'hidden' }"
3923
3920
  [ariaLabel]="nextIconAriaLabel"
3924
3921
  [pt]="ptm('pcNextButton')"
3925
3922
  [attr.data-pc-group-section]="'navigator'"
3926
3923
  >
3927
3924
  <ng-template #icon>
3928
- <svg data-p-icon="chevron-right" *ngIf="!nextIconTemplate() && !_nextIconTemplate" />
3929
- <ng-container *ngIf="nextIconTemplate() || _nextIconTemplate">
3930
- <ng-template *ngTemplateOutlet="nextIconTemplate() || _nextIconTemplate"></ng-template>
3925
+ <svg data-p-icon="chevron-right" *ngIf="!nextIconTemplate() && !_nextIconTemplate()" />
3926
+ <ng-container *ngIf="nextIconTemplate() || _nextIconTemplate()">
3927
+ <ng-template *ngTemplateOutlet="nextIconTemplate() || _nextIconTemplate()"></ng-template>
3931
3928
  </ng-container>
3932
3929
  </ng-template>
3933
3930
  </p-button>
3934
3931
  </div>
3935
- <table [class]="cx('dayView')" role="grid" *ngIf="currentView === 'date'" [pBind]="ptm('table')">
3932
+ <table [class]="cx('dayView')" role="grid" *ngIf="currentView() === 'date'" [pBind]="ptm('table')">
3936
3933
  <thead [pBind]="ptm('tableHeader')">
3937
3934
  <tr [pBind]="ptm('tableHeaderRow')">
3938
- <th *ngIf="showWeek" [class]="cx('weekHeader')" [pBind]="ptm('weekHeader')">
3935
+ <th *ngIf="showWeek()" [class]="cx('weekHeader')" [pBind]="ptm('weekHeader')">
3939
3936
  <span [pBind]="ptm('weekHeaderLabel')">{{ getTranslation('weekHeader') }}</span>
3940
3937
  </th>
3941
- <th [class]="cx('weekDayCell')" scope="col" *ngFor="let weekDay of weekDays; let begin = first; let end = last" [pBind]="ptm('weekDayCell')">
3938
+ <th [class]="cx('weekDayCell')" scope="col" *ngFor="let weekDay of weekDays(); let begin = first; let end = last" [pBind]="ptm('weekDayCell')">
3942
3939
  <span [class]="cx('weekDay')" [pBind]="ptm('weekDay')">{{ weekDay }}</span>
3943
3940
  </th>
3944
3941
  </tr>
3945
3942
  </thead>
3946
3943
  <tbody [pBind]="ptm('tableBody')">
3947
3944
  <tr *ngFor="let week of month.dates; let j = index" [pBind]="ptm('tableBodyRow')">
3948
- <td *ngIf="showWeek" [class]="cx('weekNumber')" [pBind]="ptm('weekNumber')">
3945
+ <td *ngIf="showWeek()" [class]="cx('weekNumber')" [pBind]="ptm('weekNumber')">
3949
3946
  <span [class]="cx('weekLabelContainer')" [pBind]="ptm('weekLabelContainer')">
3950
3947
  {{ month.weekNumbers[j] }}
3951
3948
  </span>
3952
3949
  </td>
3953
3950
  <td *ngFor="let date of week" [attr.aria-label]="date.day" [class]="cx('dayCell', { date })" [pBind]="ptm('dayCell')">
3954
- <ng-container *ngIf="date.otherMonth ? showOtherMonths : true">
3951
+ <ng-container *ngIf="date.otherMonth ? showOtherMonths() : true">
3955
3952
  <span
3956
3953
  [ngClass]="dayClass(date)"
3957
3954
  (click)="onDateSelect($event, date)"
@@ -3961,12 +3958,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3961
3958
  pRipple
3962
3959
  [pBind]="ptm('day')"
3963
3960
  >
3964
- <ng-container *ngIf="!dateTemplate() && !_dateTemplate && (date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate))">{{ date.day }}</ng-container>
3965
- <ng-container *ngIf="date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate)">
3966
- <ng-container *ngTemplateOutlet="dateTemplate() || _dateTemplate; context: { $implicit: date }"></ng-container>
3961
+ <ng-container *ngIf="!dateTemplate() && !_dateTemplate() && (date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate()))">{{ date.day }}</ng-container>
3962
+ <ng-container *ngIf="date.selectable || (!disabledDateTemplate() && !_disabledDateTemplate())">
3963
+ <ng-container *ngTemplateOutlet="dateTemplate() || _dateTemplate(); context: { $implicit: date }"></ng-container>
3967
3964
  </ng-container>
3968
3965
  <ng-container *ngIf="!date.selectable">
3969
- <ng-container *ngTemplateOutlet="disabledDateTemplate() || _disabledDateTemplate; context: { $implicit: date }"></ng-container>
3966
+ <ng-container *ngTemplateOutlet="disabledDateTemplate() || _disabledDateTemplate(); context: { $implicit: date }"></ng-container>
3970
3967
  </ng-container>
3971
3968
  </span>
3972
3969
  <div *ngIf="isSelected(date)" class="p-hidden-accessible" aria-live="polite">
@@ -3979,7 +3976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3979
3976
  </table>
3980
3977
  </div>
3981
3978
  </div>
3982
- <div [class]="cx('monthView')" *ngIf="currentView === 'month'" [pBind]="ptm('monthView')">
3979
+ <div [class]="cx('monthView')" *ngIf="currentView() === 'month'" [pBind]="ptm('monthView')">
3983
3980
  <span *ngFor="let m of monthPickerValues(); let i = index" (click)="onMonthSelect($event, i)" (keydown)="onMonthCellKeydown($event, i)" [class]="cx('month', { month: m, index: i })" pRipple [pBind]="ptm('month')">
3984
3981
  {{ m }}
3985
3982
  <div *ngIf="isMonthSelected(i)" class="p-hidden-accessible" aria-live="polite">
@@ -3987,7 +3984,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3987
3984
  </div>
3988
3985
  </span>
3989
3986
  </div>
3990
- <div [class]="cx('yearView')" *ngIf="currentView === 'year'" [pBind]="ptm('yearView')">
3987
+ <div [class]="cx('yearView')" *ngIf="currentView() === 'year'" [pBind]="ptm('yearView')">
3991
3988
  <span *ngFor="let y of yearPickerValues()" (click)="onYearSelect($event, y)" (keydown)="onYearCellKeydown($event, y)" [class]="cx('year', { year: y })" pRipple [pBind]="ptm('year')">
3992
3989
  {{ y }}
3993
3990
  <div *ngIf="isYearSelected(y)" class="p-hidden-accessible" aria-live="polite">
@@ -3996,7 +3993,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
3996
3993
  </span>
3997
3994
  </div>
3998
3995
  </ng-container>
3999
- <div [class]="cx('timePicker')" *ngIf="(showTime || timeOnly) && currentView === 'date'" [pBind]="ptm('timePicker')">
3996
+ <div [class]="cx('timePicker')" *ngIf="(showTime() || timeOnly()) && currentView() === 'date'" [pBind]="ptm('timePicker')">
4000
3997
  <div [class]="cx('hourPicker')" [pBind]="ptm('hourPicker')">
4001
3998
  <p-button
4002
3999
  rounded
@@ -4016,11 +4013,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4016
4013
  [attr.data-pc-group-section]="'timepickerbutton'"
4017
4014
  >
4018
4015
  <ng-template #icon>
4019
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
4020
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
4016
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
4017
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
4021
4018
  </ng-template>
4022
4019
  </p-button>
4023
- <span [pBind]="ptm('hour')"><ng-container *ngIf="currentHour < 10">0</ng-container>{{ currentHour }}</span>
4020
+ <span [pBind]="ptm('hour')"><ng-container *ngIf="currentHour() < 10">0</ng-container>{{ currentHour() }}</span>
4024
4021
  <p-button
4025
4022
  rounded
4026
4023
  variant="text"
@@ -4039,13 +4036,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4039
4036
  [attr.data-pc-group-section]="'timepickerbutton'"
4040
4037
  >
4041
4038
  <ng-template #icon>
4042
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
4043
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
4039
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
4040
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
4044
4041
  </ng-template>
4045
4042
  </p-button>
4046
4043
  </div>
4047
4044
  <div class="p-datepicker-separator" [pBind]="ptm('separatorContainer')">
4048
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
4045
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
4049
4046
  </div>
4050
4047
  <div [class]="cx('minutePicker')" [pBind]="ptm('minutePicker')">
4051
4048
  <p-button
@@ -4066,11 +4063,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4066
4063
  [attr.data-pc-group-section]="'timepickerbutton'"
4067
4064
  >
4068
4065
  <ng-template #icon>
4069
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
4070
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
4066
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
4067
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
4071
4068
  </ng-template>
4072
4069
  </p-button>
4073
- <span [pBind]="ptm('minute')"><ng-container *ngIf="currentMinute < 10">0</ng-container>{{ currentMinute }}</span>
4070
+ <span [pBind]="ptm('minute')"><ng-container *ngIf="currentMinute() < 10">0</ng-container>{{ currentMinute() }}</span>
4074
4071
  <p-button
4075
4072
  rounded
4076
4073
  variant="text"
@@ -4089,15 +4086,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4089
4086
  [attr.data-pc-group-section]="'timepickerbutton'"
4090
4087
  >
4091
4088
  <ng-template #icon>
4092
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
4093
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
4089
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
4090
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
4094
4091
  </ng-template>
4095
4092
  </p-button>
4096
4093
  </div>
4097
- <div [class]="cx('separator')" *ngIf="showSeconds" [pBind]="ptm('separatorContainer')">
4098
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
4094
+ <div [class]="cx('separator')" *ngIf="showSeconds()" [pBind]="ptm('separatorContainer')">
4095
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
4099
4096
  </div>
4100
- <div [class]="cx('secondPicker')" *ngIf="showSeconds" [pBind]="ptm('secondPicker')">
4097
+ <div [class]="cx('secondPicker')" *ngIf="showSeconds()" [pBind]="ptm('secondPicker')">
4101
4098
  <p-button
4102
4099
  rounded
4103
4100
  variant="text"
@@ -4116,11 +4113,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4116
4113
  [attr.data-pc-group-section]="'timepickerbutton'"
4117
4114
  >
4118
4115
  <ng-template #icon>
4119
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
4120
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
4116
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
4117
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
4121
4118
  </ng-template>
4122
4119
  </p-button>
4123
- <span [pBind]="ptm('second')"><ng-container *ngIf="currentSecond < 10">0</ng-container>{{ currentSecond }}</span>
4120
+ <span [pBind]="ptm('second')"><ng-container *ngIf="currentSecond() < 10">0</ng-container>{{ currentSecond() }}</span>
4124
4121
  <p-button
4125
4122
  rounded
4126
4123
  variant="text"
@@ -4139,15 +4136,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4139
4136
  [attr.data-pc-group-section]="'timepickerbutton'"
4140
4137
  >
4141
4138
  <ng-template #icon>
4142
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
4143
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
4139
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
4140
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
4144
4141
  </ng-template>
4145
4142
  </p-button>
4146
4143
  </div>
4147
- <div [class]="cx('separator')" *ngIf="hourFormat == '12'" [pBind]="ptm('separatorContainer')">
4148
- <span [pBind]="ptm('separator')">{{ timeSeparator }}</span>
4144
+ <div [class]="cx('separator')" *ngIf="hourFormat() == '12'" [pBind]="ptm('separatorContainer')">
4145
+ <span [pBind]="ptm('separator')">{{ timeSeparator() }}</span>
4149
4146
  </div>
4150
- <div [class]="cx('ampmPicker')" *ngIf="hourFormat == '12'" [pBind]="ptm('ampmPicker')">
4147
+ <div [class]="cx('ampmPicker')" *ngIf="hourFormat() == '12'" [pBind]="ptm('ampmPicker')">
4151
4148
  <p-button
4152
4149
  text
4153
4150
  rounded
@@ -4161,11 +4158,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4161
4158
  [attr.data-pc-group-section]="'timepickerbutton'"
4162
4159
  >
4163
4160
  <ng-template #icon>
4164
- <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate" [pBind]="ptm('pcIncrementButton')['icon']" />
4165
- <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate"></ng-template>
4161
+ <svg data-p-icon="chevron-up" *ngIf="!incrementIconTemplate() && !_incrementIconTemplate()" [pBind]="ptm('pcIncrementButton')['icon']" />
4162
+ <ng-template *ngTemplateOutlet="incrementIconTemplate() || _incrementIconTemplate()"></ng-template>
4166
4163
  </ng-template>
4167
4164
  </p-button>
4168
- <span [pBind]="ptm('ampm')">{{ pm ? 'PM' : 'AM' }}</span>
4165
+ <span [pBind]="ptm('ampm')">{{ pm() ? 'PM' : 'AM' }}</span>
4169
4166
  <p-button
4170
4167
  text
4171
4168
  rounded
@@ -4179,15 +4176,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4179
4176
  [attr.data-pc-group-section]="'timepickerbutton'"
4180
4177
  >
4181
4178
  <ng-template #icon>
4182
- <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate" [pBind]="ptm('pcDecrementButton')['icon']" />
4183
- <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate"></ng-template>
4179
+ <svg data-p-icon="chevron-down" *ngIf="!decrementIconTemplate() && !_decrementIconTemplate()" [pBind]="ptm('pcDecrementButton')['icon']" />
4180
+ <ng-template *ngTemplateOutlet="decrementIconTemplate() || _decrementIconTemplate()"></ng-template>
4184
4181
  </ng-template>
4185
4182
  </p-button>
4186
4183
  </div>
4187
4184
  </div>
4188
- <div [class]="cx('buttonbar')" *ngIf="showButtonBar" [pBind]="ptm('buttonbar')">
4189
- @if (buttonBarTemplate() || _buttonBarTemplate) {
4190
- <ng-container *ngTemplateOutlet="buttonBarTemplate() || _buttonBarTemplate; context: { todayCallback: onTodayButtonClick.bind(this), clearCallback: onClearButtonClick.bind(this) }"></ng-container>
4185
+ <div [class]="cx('buttonbar')" *ngIf="showButtonBar()" [pBind]="ptm('buttonbar')">
4186
+ @if (buttonBarTemplate() || _buttonBarTemplate()) {
4187
+ <ng-container *ngTemplateOutlet="buttonBarTemplate() || _buttonBarTemplate(); context: { todayCallback: onTodayButtonClick.bind(this), clearCallback: onClearButtonClick.bind(this) }"></ng-container>
4191
4188
  } @else {
4192
4189
  <p-button
4193
4190
  size="small"
@@ -4195,7 +4192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4195
4192
  [label]="getTranslation('today')"
4196
4193
  (keydown)="onContainerButtonKeydown($event)"
4197
4194
  (onClick)="onTodayButtonClick($event)"
4198
- [ngClass]="todayButtonStyleClass"
4195
+ [ngClass]="todayButtonStyleClass()"
4199
4196
  severity="secondary"
4200
4197
  variant="text"
4201
4198
  size="small"
@@ -4208,7 +4205,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4208
4205
  [label]="getTranslation('clear')"
4209
4206
  (keydown)="onContainerButtonKeydown($event)"
4210
4207
  (onClick)="onClearButtonClick($event)"
4211
- [ngClass]="clearButtonStyleClass"
4208
+ [ngClass]="clearButtonStyleClass()"
4212
4209
  severity="secondary"
4213
4210
  variant="text"
4214
4211
  size="small"
@@ -4218,7 +4215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4218
4215
  }
4219
4216
  </div>
4220
4217
  <ng-content select="p-footer"></ng-content>
4221
- <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
4218
+ <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
4222
4219
  </div>
4223
4220
  </p-motion>
4224
4221
  `,
@@ -4226,153 +4223,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4226
4223
  changeDetection: ChangeDetectionStrategy.OnPush,
4227
4224
  encapsulation: ViewEncapsulation.None,
4228
4225
  host: {
4229
- '[class]': "cn(cx('root'), styleClass)",
4226
+ '[class]': "cx('root')",
4230
4227
  '[style]': "sx('root')"
4231
4228
  }
4232
4229
  }]
4233
- }], ctorParameters: () => [], propDecorators: { iconDisplay: [{
4234
- type: Input
4235
- }], styleClass: [{
4236
- type: Input
4237
- }], inputStyle: [{
4238
- type: Input
4239
- }], inputId: [{
4240
- type: Input
4241
- }], inputStyleClass: [{
4242
- type: Input
4243
- }], placeholder: [{
4244
- type: Input
4245
- }], ariaLabelledBy: [{
4246
- type: Input
4247
- }], ariaLabel: [{
4248
- type: Input
4249
- }], iconAriaLabel: [{
4250
- type: Input
4251
- }], dateFormat: [{
4252
- type: Input
4253
- }], multipleSeparator: [{
4254
- type: Input
4255
- }], rangeSeparator: [{
4256
- type: Input
4257
- }], inline: [{
4258
- type: Input,
4259
- args: [{ transform: booleanAttribute }]
4260
- }], showOtherMonths: [{
4261
- type: Input,
4262
- args: [{ transform: booleanAttribute }]
4263
- }], selectOtherMonths: [{
4264
- type: Input,
4265
- args: [{ transform: booleanAttribute }]
4266
- }], showIcon: [{
4267
- type: Input,
4268
- args: [{ transform: booleanAttribute }]
4269
- }], icon: [{
4270
- type: Input
4271
- }], readonlyInput: [{
4272
- type: Input,
4273
- args: [{ transform: booleanAttribute }]
4274
- }], shortYearCutoff: [{
4275
- type: Input
4276
- }], hourFormat: [{
4277
- type: Input
4278
- }], timeOnly: [{
4279
- type: Input,
4280
- args: [{ transform: booleanAttribute }]
4281
- }], stepHour: [{
4282
- type: Input,
4283
- args: [{ transform: numberAttribute }]
4284
- }], stepMinute: [{
4285
- type: Input,
4286
- args: [{ transform: numberAttribute }]
4287
- }], stepSecond: [{
4288
- type: Input,
4289
- args: [{ transform: numberAttribute }]
4290
- }], showSeconds: [{
4291
- type: Input,
4292
- args: [{ transform: booleanAttribute }]
4293
- }], showOnFocus: [{
4294
- type: Input,
4295
- args: [{ transform: booleanAttribute }]
4296
- }], showWeek: [{
4297
- type: Input,
4298
- args: [{ transform: booleanAttribute }]
4299
- }], startWeekFromFirstDayOfYear: [{
4300
- type: Input
4301
- }], showClear: [{
4302
- type: Input,
4303
- args: [{ transform: booleanAttribute }]
4304
- }], dataType: [{
4305
- type: Input
4306
- }], selectionMode: [{
4307
- type: Input
4308
- }], maxDateCount: [{
4309
- type: Input,
4310
- args: [{ transform: numberAttribute }]
4311
- }], showButtonBar: [{
4312
- type: Input,
4313
- args: [{ transform: booleanAttribute }]
4314
- }], todayButtonStyleClass: [{
4315
- type: Input
4316
- }], clearButtonStyleClass: [{
4317
- type: Input
4318
- }], autofocus: [{
4319
- type: Input,
4320
- args: [{ transform: booleanAttribute }]
4321
- }], autoZIndex: [{
4322
- type: Input,
4323
- args: [{ transform: booleanAttribute }]
4324
- }], baseZIndex: [{
4325
- type: Input,
4326
- args: [{ transform: numberAttribute }]
4327
- }], panelStyleClass: [{
4328
- type: Input
4329
- }], panelStyle: [{
4330
- type: Input
4331
- }], keepInvalid: [{
4332
- type: Input,
4333
- args: [{ transform: booleanAttribute }]
4334
- }], hideOnDateTimeSelect: [{
4335
- type: Input,
4336
- args: [{ transform: booleanAttribute }]
4337
- }], touchUI: [{
4338
- type: Input,
4339
- args: [{ transform: booleanAttribute }]
4340
- }], timeSeparator: [{
4341
- type: Input
4342
- }], focusTrap: [{
4343
- type: Input,
4344
- args: [{ transform: booleanAttribute }]
4345
- }], showTransitionOptions: [{
4346
- type: Input
4347
- }], hideTransitionOptions: [{
4348
- type: Input
4349
- }], tabindex: [{
4350
- type: Input,
4351
- args: [{ transform: numberAttribute }]
4352
- }], minDate: [{
4353
- type: Input
4354
- }], maxDate: [{
4355
- type: Input
4356
- }], disabledDates: [{
4357
- type: Input
4358
- }], disabledDays: [{
4359
- type: Input
4360
- }], showTime: [{
4361
- type: Input
4362
- }], responsiveOptions: [{
4363
- type: Input
4364
- }], numberOfMonths: [{
4365
- type: Input
4366
- }], firstDayOfWeek: [{
4367
- type: Input
4368
- }], view: [{
4369
- type: Input
4370
- }], defaultDate: [{
4371
- type: Input
4372
- }], 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 }] }], content: [{
4373
- type: ViewChild,
4374
- args: ['contentWrapper', { static: false }]
4375
- }], 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 }] }] } });
4230
+ }], 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 }] }] } });
4376
4231
  class DatePickerModule {
4377
4232
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4378
4233
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: DatePickerModule, imports: [DatePicker, SharedModule], exports: [DatePicker, SharedModule] });