@progress/kendo-angular-dateinputs 6.0.3-dev.202203150818 → 7.0.0-dev.202204150726

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 (553) hide show
  1. package/bundles/kendo-angular-dateinputs.umd.js +5 -0
  2. package/calendar/calendar-common.module.d.ts +24 -0
  3. package/{dist/es2015/calendar → calendar}/calendar.component.d.ts +46 -21
  4. package/{dist/es2015/calendar → calendar}/calendar.module.d.ts +16 -0
  5. package/{dist/es2015/calendar → calendar}/calendars.module.d.ts +6 -0
  6. package/{dist/es2015/calendar → calendar}/for.directive.d.ts +8 -5
  7. package/{dist/es2015/calendar → calendar}/header.component.d.ts +3 -0
  8. package/{dist/es2015/calendar → calendar}/horizontal-view-list.component.d.ts +9 -5
  9. package/{dist/es2015/calendar → calendar}/localization/calendar-custom-messages.component.d.ts +4 -1
  10. package/{dist/es2015/calendar → calendar}/localization/calendar-localized-messages.directive.d.ts +3 -0
  11. package/{dist/es2015/calendar → calendar}/localization/calendar-messages.d.ts +3 -0
  12. package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-custom-messages.component.d.ts +4 -1
  13. package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-localized-messages.directive.d.ts +3 -0
  14. package/{dist/es2015/calendar → calendar}/localization/multiview-calendar-messages.d.ts +3 -0
  15. package/{dist/es2015/calendar → calendar}/models/cell-context.interface.d.ts +0 -0
  16. package/{dist/es2015/calendar → calendar}/models/keydown.interface.d.ts +0 -0
  17. package/{dist/es2015/calendar → calendar}/models/navigation-action.enum.d.ts +0 -0
  18. package/{dist/es2015/calendar → calendar}/models/row-length-options.interface.d.ts +0 -0
  19. package/{dist/es2015/calendar → calendar}/models/scrollable.interface.d.ts +0 -0
  20. package/{dist/es2015/calendar → calendar}/models/selection-range-end.type.d.ts +0 -0
  21. package/{dist/es2015/calendar → calendar}/models/selection-range.interface.d.ts +0 -0
  22. package/{dist/es2015/calendar → calendar}/models/selection.d.ts +0 -0
  23. package/{dist/es2015/calendar → calendar}/models/type.d.ts +0 -0
  24. package/{dist/es2015/calendar → calendar}/models/view-service.interface.d.ts +0 -0
  25. package/{dist/es2015/calendar → calendar}/models/view.enum.d.ts +0 -0
  26. package/{dist/es2015/calendar → calendar}/models/view.type.d.ts +0 -0
  27. package/{dist/es2015/calendar → calendar}/multiview-calendar.component.d.ts +38 -24
  28. package/{dist/es2015/calendar → calendar}/multiview-calendar.module.d.ts +14 -0
  29. package/{dist/es2015/calendar → calendar}/navigation.component.d.ts +4 -1
  30. package/{dist/es2015/calendar → calendar}/services/bus-view.service.d.ts +3 -0
  31. package/{dist/es2015/calendar → calendar}/services/century-view.service.d.ts +3 -0
  32. package/{dist/es2015/calendar → calendar}/services/decade-view.service.d.ts +3 -0
  33. package/{dist/es2015/calendar → calendar}/services/disabled-dates.service.d.ts +3 -0
  34. package/{dist/es2015/calendar → calendar}/services/dom.service.d.ts +3 -0
  35. package/{dist/es2015/calendar → calendar}/services/month-view.service.d.ts +3 -0
  36. package/{dist/es2015/calendar → calendar}/services/navigation.service.d.ts +3 -0
  37. package/{dist/es2015/calendar → calendar}/services/scroll-sync.service.d.ts +3 -0
  38. package/{dist/es2015/calendar → calendar}/services/selection.service.d.ts +3 -0
  39. package/{dist/es2015/calendar → calendar}/services/weeknames.service.d.ts +3 -0
  40. package/{dist/es2015/calendar → calendar}/services/year-view.service.d.ts +3 -0
  41. package/{dist/es2015/calendar → calendar}/templates/cell-template.directive.d.ts +3 -0
  42. package/{dist/es2015/calendar → calendar}/templates/century-cell-template.directive.d.ts +3 -0
  43. package/{dist/es2015/calendar → calendar}/templates/decade-cell-template.directive.d.ts +3 -0
  44. package/{dist/es2015/calendar → calendar}/templates/header-title-template.directive.d.ts +3 -0
  45. package/{dist/es2015/calendar → calendar}/templates/month-cell-template.directive.d.ts +3 -0
  46. package/{dist/es2015/calendar → calendar}/templates/navigation-item-template.directive.d.ts +3 -0
  47. package/{dist/es2015/calendar → calendar}/templates/weeknumber-cell-template.directive.d.ts +3 -0
  48. package/{dist/es2015/calendar → calendar}/templates/year-cell-template.directive.d.ts +3 -0
  49. package/calendar/templates.module.d.ts +33 -0
  50. package/{dist/es2015/calendar → calendar}/view-list.component.d.ts +9 -5
  51. package/{dist/es2015/calendar → calendar}/view.component.d.ts +5 -1
  52. package/{dist/es2015/common → common}/dom-queries.d.ts +0 -0
  53. package/{dist/es2015/common → common}/models/fillmode.d.ts +5 -5
  54. package/{dist/es2015/common → common}/models/rounded.d.ts +6 -6
  55. package/{dist/es2015/common → common}/models/size.d.ts +5 -5
  56. package/{dist/es2015/common → common}/picker.service.d.ts +0 -0
  57. package/{dist/es2015/common → common}/utils.d.ts +0 -0
  58. package/{dist/es2015/dateinput → dateinput}/arrow.enum.d.ts +0 -0
  59. package/{dist/es2015/dateinput → dateinput}/dateinput.component.d.ts +34 -25
  60. package/dateinput/dateinput.module.d.ts +20 -0
  61. package/{dist/es2015/dateinput → dateinput}/localization/dateinput-custom-messages.component.d.ts +4 -1
  62. package/{dist/es2015/dateinput → dateinput}/localization/dateinput-localized-messages.directive.d.ts +3 -0
  63. package/{dist/es2015/dateinput → dateinput}/localization/messages.d.ts +3 -0
  64. package/{dist/es2015/dateinput → dateinput}/models/format-placeholder.model.d.ts +0 -0
  65. package/{dist/es2015/dateinput → dateinput}/models/format-settings.model.d.ts +0 -0
  66. package/{dist/es2015/dateinput → dateinput}/models/incremental-steps.model.d.ts +0 -0
  67. package/{dist/es2015/dateinputs.module.d.ts → dateinputs.module.d.ts} +10 -0
  68. package/{dist/es2015/datepicker → datepicker}/datepicker.component.d.ts +49 -37
  69. package/datepicker/datepicker.module.d.ts +24 -0
  70. package/{dist/es2015/datepicker → datepicker}/localization/datepicker-custom-messages.component.d.ts +4 -1
  71. package/{dist/es2015/datepicker → datepicker}/localization/datepicker-localized-messages.directive.d.ts +3 -0
  72. package/{dist/es2015/datepicker → datepicker}/localization/messages.d.ts +3 -0
  73. package/{dist/es2015/daterange → daterange}/auto-correct-on.type.d.ts +0 -0
  74. package/{dist/es2015/daterange → daterange}/date-range-end-input.directive.d.ts +3 -0
  75. package/{dist/es2015/daterange → daterange}/date-range-input.d.ts +2 -2
  76. package/{dist/es2015/daterange → daterange}/date-range-popup-template.directive.d.ts +3 -0
  77. package/{dist/es2015/daterange → daterange}/date-range-popup.component.d.ts +9 -4
  78. package/{dist/es2015/daterange → daterange}/date-range-selection.directive.d.ts +8 -3
  79. package/{dist/es2015/daterange → daterange}/date-range-start-input.directive.d.ts +3 -0
  80. package/{dist/es2015/daterange → daterange}/date-range.component.d.ts +5 -1
  81. package/{dist/es2015/daterange → daterange}/date-range.module.d.ts +15 -1
  82. package/{dist/es2015/daterange → daterange}/date-range.service.d.ts +11 -6
  83. package/{dist/es2015/datetimepicker → datetimepicker}/datetimepicker.component.d.ts +51 -36
  84. package/datetimepicker/datetimepicker.module.d.ts +25 -0
  85. package/{dist/es2015/datetimepicker → datetimepicker}/localization/datetimepicker-custom-messages.component.d.ts +4 -1
  86. package/{dist/es2015/datetimepicker → datetimepicker}/localization/localized-messages.directive.d.ts +3 -0
  87. package/{dist/es2015/datetimepicker → datetimepicker}/localization/messages.d.ts +3 -0
  88. package/{dist/es2015/datetimepicker → datetimepicker}/models/active-tab.type.d.ts +0 -0
  89. package/{dist/es2015/defaults.d.ts → defaults.d.ts} +0 -0
  90. package/esm2015/calendar/calendar-common.module.js +45 -0
  91. package/{dist/es2015 → esm2015}/calendar/calendar.component.js +283 -246
  92. package/{dist/es2015 → esm2015}/calendar/calendar.module.js +71 -34
  93. package/{dist/es2015 → esm2015}/calendar/calendars.module.js +23 -14
  94. package/{dist/es2015 → esm2015}/calendar/for.directive.js +17 -25
  95. package/{dist/es2015 → esm2015}/calendar/header.component.js +97 -73
  96. package/{dist/es2015 → esm2015}/calendar/horizontal-view-list.component.js +155 -130
  97. package/esm2015/calendar/localization/calendar-custom-messages.component.js +40 -0
  98. package/esm2015/calendar/localization/calendar-localized-messages.directive.js +36 -0
  99. package/esm2015/calendar/localization/calendar-messages.js +27 -0
  100. package/esm2015/calendar/localization/multiview-calendar-custom-messages.component.js +40 -0
  101. package/esm2015/calendar/localization/multiview-calendar-localized-messages.directive.js +36 -0
  102. package/esm2015/calendar/localization/multiview-calendar-messages.js +27 -0
  103. package/{dist/es → esm2015}/calendar/models/cell-context.interface.js +1 -0
  104. package/{dist/es2015 → esm2015}/calendar/models/keydown.interface.js +1 -0
  105. package/{dist/es → esm2015}/calendar/models/navigation-action.enum.js +0 -0
  106. package/{dist/es2015 → esm2015}/calendar/models/row-length-options.interface.js +1 -0
  107. package/{dist/es/virtualization → esm2015/calendar}/models/scrollable.interface.js +1 -0
  108. package/{dist/es → esm2015}/calendar/models/selection-range-end.type.js +1 -0
  109. package/{dist/es2015 → esm2015}/calendar/models/selection-range.interface.js +0 -0
  110. package/{dist/es → esm2015}/calendar/models/selection.js +1 -0
  111. package/{dist/es → esm2015}/calendar/models/type.js +1 -0
  112. package/{dist/es → esm2015}/calendar/models/view-service.interface.js +1 -0
  113. package/{dist/es → esm2015}/calendar/models/view.enum.js +0 -0
  114. package/{dist/es → esm2015}/calendar/models/view.type.js +1 -0
  115. package/{dist/es2015 → esm2015}/calendar/multiview-calendar.component.js +246 -298
  116. package/{dist/es2015 → esm2015}/calendar/multiview-calendar.module.js +63 -32
  117. package/{dist/es2015 → esm2015}/calendar/navigation.component.js +71 -62
  118. package/{dist/es2015 → esm2015}/calendar/services/bus-view.service.js +9 -11
  119. package/{dist/es2015 → esm2015}/calendar/services/century-view.service.js +8 -11
  120. package/{dist/es2015 → esm2015}/calendar/services/decade-view.service.js +8 -11
  121. package/{dist/es2015 → esm2015}/calendar/services/disabled-dates.service.js +8 -12
  122. package/{dist/es2015 → esm2015}/calendar/services/dom.service.js +10 -26
  123. package/{dist/es2015 → esm2015}/calendar/services/month-view.service.js +9 -10
  124. package/{dist/es2015 → esm2015}/calendar/services/navigation.service.js +9 -9
  125. package/{dist/es2015 → esm2015}/calendar/services/scroll-sync.service.js +10 -13
  126. package/{dist/es2015 → esm2015}/calendar/services/selection.service.js +9 -9
  127. package/{dist/es2015 → esm2015}/calendar/services/weeknames.service.js +9 -9
  128. package/{dist/es2015 → esm2015}/calendar/services/year-view.service.js +9 -13
  129. package/{dist/es2015 → esm2015}/calendar/templates/cell-template.directive.js +12 -11
  130. package/{dist/es2015 → esm2015}/calendar/templates/century-cell-template.directive.js +12 -11
  131. package/{dist/es2015 → esm2015}/calendar/templates/decade-cell-template.directive.js +12 -11
  132. package/{dist/es2015 → esm2015}/calendar/templates/header-title-template.directive.js +12 -11
  133. package/{dist/es2015 → esm2015}/calendar/templates/month-cell-template.directive.js +12 -11
  134. package/{dist/es2015 → esm2015}/calendar/templates/navigation-item-template.directive.js +12 -11
  135. package/{dist/es2015 → esm2015}/calendar/templates/weeknumber-cell-template.directive.js +12 -11
  136. package/{dist/es2015 → esm2015}/calendar/templates/year-cell-template.directive.js +12 -11
  137. package/esm2015/calendar/templates.module.js +73 -0
  138. package/{dist/es2015 → esm2015}/calendar/view-list.component.js +135 -120
  139. package/{dist/es2015 → esm2015}/calendar/view.component.js +105 -98
  140. package/{dist/es2015 → esm2015}/common/dom-queries.js +0 -0
  141. package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
  142. package/{dist/es → esm2015}/common/models/rounded.js +1 -0
  143. package/{dist/es → esm2015}/common/models/size.js +1 -0
  144. package/{dist/es2015 → esm2015}/common/picker.service.js +0 -0
  145. package/{dist/es2015 → esm2015}/common/utils.js +0 -0
  146. package/{dist/es → esm2015}/dateinput/arrow.enum.js +0 -0
  147. package/{dist/es2015 → esm2015}/dateinput/dateinput.component.js +215 -216
  148. package/esm2015/dateinput/dateinput.module.js +41 -0
  149. package/esm2015/dateinput/localization/dateinput-custom-messages.component.js +40 -0
  150. package/esm2015/dateinput/localization/dateinput-localized-messages.directive.js +36 -0
  151. package/esm2015/dateinput/localization/messages.js +25 -0
  152. package/{dist/es → esm2015}/dateinput/models/format-placeholder.model.js +1 -0
  153. package/{dist/es → esm2015}/dateinput/models/format-settings.model.js +1 -0
  154. package/{dist/es → esm2015}/dateinput/models/incremental-steps.model.js +1 -0
  155. package/{dist/es2015 → esm2015}/dateinputs.module.js +28 -10
  156. package/{dist/es2015 → esm2015}/datepicker/datepicker.component.js +320 -317
  157. package/esm2015/datepicker/datepicker.module.js +72 -0
  158. package/esm2015/datepicker/localization/datepicker-custom-messages.component.js +40 -0
  159. package/esm2015/datepicker/localization/datepicker-localized-messages.directive.js +36 -0
  160. package/esm2015/datepicker/localization/messages.js +29 -0
  161. package/{dist/es → esm2015}/daterange/auto-correct-on.type.js +1 -0
  162. package/{dist/es2015 → esm2015}/daterange/date-range-end-input.directive.js +18 -25
  163. package/{dist/es2015 → esm2015}/daterange/date-range-input.js +0 -0
  164. package/esm2015/daterange/date-range-popup-template.directive.js +23 -0
  165. package/{dist/es2015 → esm2015}/daterange/date-range-popup.component.js +71 -89
  166. package/{dist/es2015 → esm2015}/daterange/date-range-selection.directive.js +26 -39
  167. package/{dist/es2015 → esm2015}/daterange/date-range-start-input.directive.js +18 -25
  168. package/esm2015/daterange/date-range.component.js +77 -0
  169. package/{dist/es2015 → esm2015}/daterange/date-range.module.js +27 -12
  170. package/{dist/es2015 → esm2015}/daterange/date-range.service.js +9 -14
  171. package/{dist/es2015 → esm2015}/datetimepicker/datetimepicker.component.js +436 -257
  172. package/esm2015/datetimepicker/datetimepicker.module.js +80 -0
  173. package/esm2015/datetimepicker/localization/datetimepicker-custom-messages.component.js +40 -0
  174. package/esm2015/datetimepicker/localization/localized-messages.directive.js +36 -0
  175. package/esm2015/datetimepicker/localization/messages.js +49 -0
  176. package/{dist/es → esm2015}/datetimepicker/models/active-tab.type.js +1 -0
  177. package/{dist/es2015 → esm2015}/defaults.js +0 -0
  178. package/esm2015/kendo-angular-dateinputs.js +8 -0
  179. package/{dist/es → esm2015}/main.js +24 -0
  180. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  181. package/{dist/es → esm2015}/popup-settings.model.js +1 -0
  182. package/{dist/es2015 → esm2015}/preventable-event.js +1 -0
  183. package/esm2015/timepicker/localization/messages.js +35 -0
  184. package/esm2015/timepicker/localization/timepicker-custom-messages.component.js +40 -0
  185. package/esm2015/timepicker/localization/timepicker-localized-messages.directive.js +36 -0
  186. package/esm2015/timepicker/localization/timeselector-custom-messages.component.js +42 -0
  187. package/esm2015/timepicker/localization/timeselector-localized-messages.directive.js +36 -0
  188. package/{dist/es → esm2015}/timepicker/models/incremental-steps.model.js +1 -0
  189. package/{dist/es → esm2015}/timepicker/models/list-item.interface.js +1 -0
  190. package/{dist/es → esm2015}/timepicker/models/list-service-settings.js +1 -0
  191. package/{dist/es → esm2015}/timepicker/models/list-service.interface.js +1 -0
  192. package/{dist/es2015 → esm2015}/timepicker/models/time-part.default.js +0 -0
  193. package/{dist/es2015 → esm2015}/timepicker/services/dayperiod.service.js +9 -15
  194. package/{dist/es2015 → esm2015}/timepicker/services/dom.service.js +8 -13
  195. package/{dist/es2015 → esm2015}/timepicker/services/hours.service.js +9 -14
  196. package/{dist/es2015 → esm2015}/timepicker/services/milliseconds.service.js +9 -14
  197. package/{dist/es2015 → esm2015}/timepicker/services/minutes.service.js +9 -14
  198. package/{dist/es2015 → esm2015}/timepicker/services/seconds.service.js +9 -14
  199. package/{dist/es2015 → esm2015}/timepicker/timelist.component.js +66 -61
  200. package/{dist/es2015 → esm2015}/timepicker/timepicker.component.js +251 -208
  201. package/{dist/es2015 → esm2015}/timepicker/timepicker.module.js +32 -15
  202. package/{dist/es2015 → esm2015}/timepicker/timeselector.component.js +181 -104
  203. package/{dist/es2015 → esm2015}/timepicker/util.js +8 -20
  204. package/{dist/es2015 → esm2015}/touch-enabled.js +0 -0
  205. package/{dist/es2015 → esm2015}/util.js +13 -6
  206. package/{dist/es2015 → esm2015}/validators/disabled-date.validator.js +0 -0
  207. package/{dist/es2015 → esm2015}/validators/disabled-dates-range.validator.js +0 -2
  208. package/{dist/es2015 → esm2015}/validators/incomplete-date.validator.js +0 -0
  209. package/{dist/es2015 → esm2015}/validators/max.validator.js +0 -0
  210. package/{dist/es2015 → esm2015}/validators/min.validator.js +0 -0
  211. package/{dist/es2015 → esm2015}/validators/time-range.validator.js +0 -0
  212. package/{dist/es2015/calendar → esm2015/virtualization}/models/scrollable.interface.js +1 -0
  213. package/{dist/es2015 → esm2015}/virtualization/services/row-height.service.js +1 -3
  214. package/{dist/es2015 → esm2015}/virtualization/services/scroller.service.js +0 -2
  215. package/{dist/es2015 → esm2015}/virtualization/virtualization.component.js +75 -90
  216. package/esm2015/virtualization/virtualization.module.js +30 -0
  217. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-dateinputs.js} +9763 -9156
  218. package/{dist/es/calendar/models/selection-range.interface.js → kendo-angular-dateinputs.d.ts} +3 -2
  219. package/{dist/es2015/main.d.ts → main.d.ts} +24 -0
  220. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  221. package/package.json +46 -117
  222. package/{dist/es2015/popup-settings.model.d.ts → popup-settings.model.d.ts} +0 -0
  223. package/{dist/es2015/preventable-event.d.ts → preventable-event.d.ts} +2 -0
  224. package/schematics/ngAdd/index.js +5 -2
  225. package/schematics/ngAdd/index.js.map +1 -1
  226. package/{dist/es2015/timepicker → timepicker}/localization/messages.d.ts +3 -0
  227. package/{dist/es2015/timepicker → timepicker}/localization/timepicker-custom-messages.component.d.ts +4 -1
  228. package/{dist/es2015/timepicker → timepicker}/localization/timepicker-localized-messages.directive.d.ts +3 -0
  229. package/{dist/es2015/timepicker → timepicker}/localization/timeselector-custom-messages.component.d.ts +4 -1
  230. package/{dist/es2015/timepicker → timepicker}/localization/timeselector-localized-messages.directive.d.ts +3 -0
  231. package/{dist/es2015/timepicker → timepicker}/models/incremental-steps.model.d.ts +0 -0
  232. package/{dist/es2015/timepicker → timepicker}/models/list-item.interface.d.ts +0 -0
  233. package/{dist/es2015/timepicker → timepicker}/models/list-service-settings.d.ts +0 -0
  234. package/{dist/es2015/timepicker → timepicker}/models/list-service.interface.d.ts +0 -0
  235. package/{dist/es2015/timepicker → timepicker}/models/time-part.default.d.ts +0 -0
  236. package/{dist/es2015/timepicker → timepicker}/services/dayperiod.service.d.ts +3 -0
  237. package/{dist/es2015/timepicker → timepicker}/services/dom.service.d.ts +3 -0
  238. package/{dist/es2015/timepicker → timepicker}/services/hours.service.d.ts +3 -0
  239. package/{dist/es2015/timepicker → timepicker}/services/milliseconds.service.d.ts +3 -0
  240. package/{dist/es2015/timepicker → timepicker}/services/minutes.service.d.ts +3 -0
  241. package/{dist/es2015/timepicker → timepicker}/services/seconds.service.d.ts +3 -0
  242. package/{dist/es2015/timepicker → timepicker}/timelist.component.d.ts +4 -1
  243. package/{dist/es2015/timepicker → timepicker}/timepicker.component.d.ts +45 -31
  244. package/timepicker/timepicker.module.d.ts +27 -0
  245. package/{dist/es2015/timepicker → timepicker}/timeselector.component.d.ts +10 -4
  246. package/{dist/es2015/timepicker → timepicker}/util.d.ts +0 -0
  247. package/{dist/es2015/touch-enabled.d.ts → touch-enabled.d.ts} +0 -0
  248. package/{dist/es2015/util.d.ts → util.d.ts} +12 -0
  249. package/{dist/es2015/validators → validators}/disabled-date.validator.d.ts +0 -0
  250. package/{dist/es2015/validators → validators}/disabled-dates-range.validator.d.ts +0 -0
  251. package/{dist/es2015/validators → validators}/incomplete-date.validator.d.ts +0 -0
  252. package/{dist/es2015/validators → validators}/max.validator.d.ts +0 -0
  253. package/{dist/es2015/validators → validators}/min.validator.d.ts +0 -0
  254. package/{dist/es2015/validators → validators}/time-range.validator.d.ts +0 -0
  255. package/{dist/es2015/virtualization → virtualization}/models/scrollable.interface.d.ts +0 -0
  256. package/{dist/es2015/virtualization → virtualization}/services/row-height.service.d.ts +0 -0
  257. package/{dist/es2015/virtualization → virtualization}/services/scroller.service.d.ts +0 -0
  258. package/{dist/es2015/virtualization → virtualization}/virtualization.component.d.ts +8 -5
  259. package/{dist/es2015/virtualization → virtualization}/virtualization.module.d.ts +6 -0
  260. package/dist/cdn/js/kendo-angular-dateinputs.js +0 -20
  261. package/dist/cdn/main.js +0 -5
  262. package/dist/es/calendar/calendar-common.module.js +0 -41
  263. package/dist/es/calendar/calendar.component.js +0 -1189
  264. package/dist/es/calendar/calendar.module.js +0 -108
  265. package/dist/es/calendar/calendars.module.js +0 -60
  266. package/dist/es/calendar/for.directive.js +0 -135
  267. package/dist/es/calendar/header.component.js +0 -170
  268. package/dist/es/calendar/horizontal-view-list.component.js +0 -363
  269. package/dist/es/calendar/localization/calendar-custom-messages.component.js +0 -43
  270. package/dist/es/calendar/localization/calendar-localized-messages.directive.js +0 -35
  271. package/dist/es/calendar/localization/calendar-messages.js +0 -30
  272. package/dist/es/calendar/localization/multiview-calendar-custom-messages.component.js +0 -43
  273. package/dist/es/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -35
  274. package/dist/es/calendar/localization/multiview-calendar-messages.js +0 -30
  275. package/dist/es/calendar/models/keydown.interface.js +0 -4
  276. package/dist/es/calendar/models/row-length-options.interface.js +0 -4
  277. package/dist/es/calendar/models/scrollable.interface.js +0 -4
  278. package/dist/es/calendar/multiview-calendar.component.js +0 -1122
  279. package/dist/es/calendar/multiview-calendar.module.js +0 -97
  280. package/dist/es/calendar/navigation.component.js +0 -173
  281. package/dist/es/calendar/services/bus-view.service.js +0 -83
  282. package/dist/es/calendar/services/century-view.service.js +0 -180
  283. package/dist/es/calendar/services/decade-view.service.js +0 -179
  284. package/dist/es/calendar/services/disabled-dates.service.js +0 -70
  285. package/dist/es/calendar/services/dom.service.js +0 -195
  286. package/dist/es/calendar/services/month-view.service.js +0 -203
  287. package/dist/es/calendar/services/navigation.service.js +0 -53
  288. package/dist/es/calendar/services/scroll-sync.service.js +0 -85
  289. package/dist/es/calendar/services/selection.service.js +0 -55
  290. package/dist/es/calendar/services/weeknames.service.js +0 -27
  291. package/dist/es/calendar/services/year-view.service.js +0 -204
  292. package/dist/es/calendar/templates/cell-template.directive.js +0 -46
  293. package/dist/es/calendar/templates/century-cell-template.directive.js +0 -45
  294. package/dist/es/calendar/templates/decade-cell-template.directive.js +0 -45
  295. package/dist/es/calendar/templates/header-title-template.directive.js +0 -44
  296. package/dist/es/calendar/templates/month-cell-template.directive.js +0 -43
  297. package/dist/es/calendar/templates/navigation-item-template.directive.js +0 -44
  298. package/dist/es/calendar/templates/weeknumber-cell-template.directive.js +0 -43
  299. package/dist/es/calendar/templates/year-cell-template.directive.js +0 -46
  300. package/dist/es/calendar/templates.module.js +0 -59
  301. package/dist/es/calendar/view-list.component.js +0 -301
  302. package/dist/es/calendar/view.component.js +0 -318
  303. package/dist/es/common/dom-queries.js +0 -24
  304. package/dist/es/common/picker.service.js +0 -18
  305. package/dist/es/common/utils.js +0 -35
  306. package/dist/es/dateinput/dateinput.component.js +0 -1617
  307. package/dist/es/dateinput/dateinput.module.js +0 -37
  308. package/dist/es/dateinput/localization/dateinput-custom-messages.component.js +0 -43
  309. package/dist/es/dateinput/localization/dateinput-localized-messages.directive.js +0 -35
  310. package/dist/es/dateinput/localization/messages.js +0 -26
  311. package/dist/es/dateinputs.module.js +0 -63
  312. package/dist/es/datepicker/datepicker.component.js +0 -1256
  313. package/dist/es/datepicker/datepicker.module.js +0 -55
  314. package/dist/es/datepicker/localization/datepicker-custom-messages.component.js +0 -43
  315. package/dist/es/datepicker/localization/datepicker-localized-messages.directive.js +0 -35
  316. package/dist/es/datepicker/localization/messages.js +0 -34
  317. package/dist/es/daterange/date-range-end-input.directive.js +0 -97
  318. package/dist/es/daterange/date-range-input.js +0 -131
  319. package/dist/es/daterange/date-range-popup-template.directive.js +0 -23
  320. package/dist/es/daterange/date-range-popup.component.js +0 -403
  321. package/dist/es/daterange/date-range-selection.directive.js +0 -230
  322. package/dist/es/daterange/date-range-start-input.directive.js +0 -97
  323. package/dist/es/daterange/date-range.component.js +0 -71
  324. package/dist/es/daterange/date-range.module.js +0 -83
  325. package/dist/es/daterange/date-range.service.js +0 -208
  326. package/dist/es/datetimepicker/datetimepicker.component.js +0 -1309
  327. package/dist/es/datetimepicker/datetimepicker.module.js +0 -57
  328. package/dist/es/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -43
  329. package/dist/es/datetimepicker/localization/localized-messages.directive.js +0 -35
  330. package/dist/es/datetimepicker/localization/messages.js +0 -74
  331. package/dist/es/defaults.js +0 -24
  332. package/dist/es/index.js +0 -63
  333. package/dist/es/package-metadata.js +0 -15
  334. package/dist/es/preventable-event.js +0 -29
  335. package/dist/es/timepicker/localization/messages.js +0 -46
  336. package/dist/es/timepicker/localization/timepicker-custom-messages.component.js +0 -43
  337. package/dist/es/timepicker/localization/timepicker-localized-messages.directive.js +0 -35
  338. package/dist/es/timepicker/localization/timeselector-custom-messages.component.js +0 -45
  339. package/dist/es/timepicker/localization/timeselector-localized-messages.directive.js +0 -35
  340. package/dist/es/timepicker/models/time-part.default.js +0 -14
  341. package/dist/es/timepicker/services/dayperiod.service.js +0 -130
  342. package/dist/es/timepicker/services/dom.service.js +0 -64
  343. package/dist/es/timepicker/services/hours.service.js +0 -129
  344. package/dist/es/timepicker/services/milliseconds.service.js +0 -130
  345. package/dist/es/timepicker/services/minutes.service.js +0 -127
  346. package/dist/es/timepicker/services/seconds.service.js +0 -127
  347. package/dist/es/timepicker/timelist.component.js +0 -297
  348. package/dist/es/timepicker/timepicker.component.js +0 -1044
  349. package/dist/es/timepicker/timepicker.module.js +0 -75
  350. package/dist/es/timepicker/timeselector.component.js +0 -486
  351. package/dist/es/timepicker/util.js +0 -82
  352. package/dist/es/touch-enabled.js +0 -9
  353. package/dist/es/util.js +0 -395
  354. package/dist/es/validators/disabled-date.validator.js +0 -18
  355. package/dist/es/validators/disabled-dates-range.validator.js +0 -28
  356. package/dist/es/validators/incomplete-date.validator.js +0 -18
  357. package/dist/es/validators/max.validator.js +0 -21
  358. package/dist/es/validators/min.validator.js +0 -21
  359. package/dist/es/validators/time-range.validator.js +0 -23
  360. package/dist/es/virtualization/services/row-height.service.js +0 -72
  361. package/dist/es/virtualization/services/scroller.service.js +0 -111
  362. package/dist/es/virtualization/virtualization.component.js +0 -343
  363. package/dist/es/virtualization/virtualization.module.js +0 -30
  364. package/dist/es2015/calendar/calendar-common.module.d.ts +0 -15
  365. package/dist/es2015/calendar/calendar-common.module.js +0 -38
  366. package/dist/es2015/calendar/localization/calendar-custom-messages.component.js +0 -35
  367. package/dist/es2015/calendar/localization/calendar-localized-messages.directive.js +0 -31
  368. package/dist/es2015/calendar/localization/calendar-messages.js +0 -24
  369. package/dist/es2015/calendar/localization/multiview-calendar-custom-messages.component.js +0 -35
  370. package/dist/es2015/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -31
  371. package/dist/es2015/calendar/localization/multiview-calendar-messages.js +0 -24
  372. package/dist/es2015/calendar/models/cell-context.interface.js +0 -4
  373. package/dist/es2015/calendar/models/navigation-action.enum.js +0 -20
  374. package/dist/es2015/calendar/models/selection-range-end.type.js +0 -4
  375. package/dist/es2015/calendar/models/selection.js +0 -4
  376. package/dist/es2015/calendar/models/type.js +0 -4
  377. package/dist/es2015/calendar/models/view-service.interface.js +0 -4
  378. package/dist/es2015/calendar/models/view.enum.js +0 -16
  379. package/dist/es2015/calendar/models/view.type.js +0 -4
  380. package/dist/es2015/calendar/templates.module.d.ts +0 -21
  381. package/dist/es2015/calendar/templates.module.js +0 -56
  382. package/dist/es2015/common/models/fillmode.js +0 -4
  383. package/dist/es2015/common/models/rounded.js +0 -4
  384. package/dist/es2015/common/models/size.js +0 -4
  385. package/dist/es2015/dateinput/arrow.enum.js +0 -13
  386. package/dist/es2015/dateinput/dateinput.module.d.ts +0 -10
  387. package/dist/es2015/dateinput/dateinput.module.js +0 -34
  388. package/dist/es2015/dateinput/localization/dateinput-custom-messages.component.js +0 -35
  389. package/dist/es2015/dateinput/localization/dateinput-localized-messages.directive.js +0 -31
  390. package/dist/es2015/dateinput/localization/messages.js +0 -20
  391. package/dist/es2015/dateinput/models/format-placeholder.model.js +0 -4
  392. package/dist/es2015/dateinput/models/format-settings.model.js +0 -4
  393. package/dist/es2015/dateinput/models/incremental-steps.model.js +0 -4
  394. package/dist/es2015/datepicker/datepicker.module.d.ts +0 -10
  395. package/dist/es2015/datepicker/datepicker.module.js +0 -52
  396. package/dist/es2015/datepicker/localization/datepicker-custom-messages.component.js +0 -35
  397. package/dist/es2015/datepicker/localization/datepicker-localized-messages.directive.js +0 -31
  398. package/dist/es2015/datepicker/localization/messages.js +0 -28
  399. package/dist/es2015/daterange/auto-correct-on.type.js +0 -4
  400. package/dist/es2015/daterange/date-range-popup-template.directive.js +0 -22
  401. package/dist/es2015/daterange/date-range.component.js +0 -68
  402. package/dist/es2015/datetimepicker/datetimepicker.module.d.ts +0 -10
  403. package/dist/es2015/datetimepicker/datetimepicker.module.js +0 -57
  404. package/dist/es2015/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -35
  405. package/dist/es2015/datetimepicker/localization/localized-messages.directive.js +0 -31
  406. package/dist/es2015/datetimepicker/localization/messages.js +0 -68
  407. package/dist/es2015/datetimepicker/models/active-tab.type.js +0 -4
  408. package/dist/es2015/index.d.ts +0 -63
  409. package/dist/es2015/index.js +0 -63
  410. package/dist/es2015/index.metadata.json +0 -1
  411. package/dist/es2015/main.js +0 -35
  412. package/dist/es2015/popup-settings.model.js +0 -4
  413. package/dist/es2015/timepicker/localization/messages.js +0 -40
  414. package/dist/es2015/timepicker/localization/timepicker-custom-messages.component.js +0 -35
  415. package/dist/es2015/timepicker/localization/timepicker-localized-messages.directive.js +0 -31
  416. package/dist/es2015/timepicker/localization/timeselector-custom-messages.component.js +0 -37
  417. package/dist/es2015/timepicker/localization/timeselector-localized-messages.directive.js +0 -31
  418. package/dist/es2015/timepicker/models/incremental-steps.model.js +0 -4
  419. package/dist/es2015/timepicker/models/list-item.interface.js +0 -4
  420. package/dist/es2015/timepicker/models/list-service-settings.js +0 -4
  421. package/dist/es2015/timepicker/models/list-service.interface.js +0 -4
  422. package/dist/es2015/timepicker/timepicker.module.d.ts +0 -10
  423. package/dist/es2015/virtualization/models/scrollable.interface.js +0 -4
  424. package/dist/es2015/virtualization/virtualization.module.js +0 -27
  425. package/dist/fesm5/index.js +0 -15216
  426. package/dist/npm/calendar/calendar-common.module.js +0 -43
  427. package/dist/npm/calendar/calendar.component.js +0 -1191
  428. package/dist/npm/calendar/calendar.module.js +0 -110
  429. package/dist/npm/calendar/calendars.module.js +0 -62
  430. package/dist/npm/calendar/for.directive.js +0 -138
  431. package/dist/npm/calendar/header.component.js +0 -172
  432. package/dist/npm/calendar/horizontal-view-list.component.js +0 -365
  433. package/dist/npm/calendar/localization/calendar-custom-messages.component.js +0 -45
  434. package/dist/npm/calendar/localization/calendar-localized-messages.directive.js +0 -37
  435. package/dist/npm/calendar/localization/calendar-messages.js +0 -32
  436. package/dist/npm/calendar/localization/multiview-calendar-custom-messages.component.js +0 -45
  437. package/dist/npm/calendar/localization/multiview-calendar-localized-messages.directive.js +0 -37
  438. package/dist/npm/calendar/localization/multiview-calendar-messages.js +0 -32
  439. package/dist/npm/calendar/models/cell-context.interface.js +0 -6
  440. package/dist/npm/calendar/models/keydown.interface.js +0 -6
  441. package/dist/npm/calendar/models/navigation-action.enum.js +0 -22
  442. package/dist/npm/calendar/models/row-length-options.interface.js +0 -6
  443. package/dist/npm/calendar/models/scrollable.interface.js +0 -6
  444. package/dist/npm/calendar/models/selection-range-end.type.js +0 -6
  445. package/dist/npm/calendar/models/selection-range.interface.js +0 -10
  446. package/dist/npm/calendar/models/selection.js +0 -6
  447. package/dist/npm/calendar/models/type.js +0 -6
  448. package/dist/npm/calendar/models/view-service.interface.js +0 -6
  449. package/dist/npm/calendar/models/view.enum.js +0 -18
  450. package/dist/npm/calendar/models/view.type.js +0 -6
  451. package/dist/npm/calendar/multiview-calendar.component.js +0 -1124
  452. package/dist/npm/calendar/multiview-calendar.module.js +0 -99
  453. package/dist/npm/calendar/navigation.component.js +0 -175
  454. package/dist/npm/calendar/services/bus-view.service.js +0 -85
  455. package/dist/npm/calendar/services/century-view.service.js +0 -182
  456. package/dist/npm/calendar/services/decade-view.service.js +0 -181
  457. package/dist/npm/calendar/services/disabled-dates.service.js +0 -72
  458. package/dist/npm/calendar/services/dom.service.js +0 -212
  459. package/dist/npm/calendar/services/month-view.service.js +0 -205
  460. package/dist/npm/calendar/services/navigation.service.js +0 -55
  461. package/dist/npm/calendar/services/scroll-sync.service.js +0 -88
  462. package/dist/npm/calendar/services/selection.service.js +0 -57
  463. package/dist/npm/calendar/services/weeknames.service.js +0 -29
  464. package/dist/npm/calendar/services/year-view.service.js +0 -207
  465. package/dist/npm/calendar/templates/cell-template.directive.js +0 -48
  466. package/dist/npm/calendar/templates/century-cell-template.directive.js +0 -47
  467. package/dist/npm/calendar/templates/decade-cell-template.directive.js +0 -47
  468. package/dist/npm/calendar/templates/header-title-template.directive.js +0 -46
  469. package/dist/npm/calendar/templates/month-cell-template.directive.js +0 -45
  470. package/dist/npm/calendar/templates/navigation-item-template.directive.js +0 -46
  471. package/dist/npm/calendar/templates/weeknumber-cell-template.directive.js +0 -45
  472. package/dist/npm/calendar/templates/year-cell-template.directive.js +0 -48
  473. package/dist/npm/calendar/templates.module.js +0 -61
  474. package/dist/npm/calendar/view-list.component.js +0 -303
  475. package/dist/npm/calendar/view.component.js +0 -320
  476. package/dist/npm/common/dom-queries.js +0 -26
  477. package/dist/npm/common/models/fillmode.js +0 -6
  478. package/dist/npm/common/models/rounded.js +0 -6
  479. package/dist/npm/common/models/size.js +0 -6
  480. package/dist/npm/common/picker.service.js +0 -20
  481. package/dist/npm/common/utils.js +0 -37
  482. package/dist/npm/dateinput/arrow.enum.js +0 -15
  483. package/dist/npm/dateinput/dateinput.component.js +0 -1620
  484. package/dist/npm/dateinput/dateinput.module.js +0 -39
  485. package/dist/npm/dateinput/localization/dateinput-custom-messages.component.js +0 -45
  486. package/dist/npm/dateinput/localization/dateinput-localized-messages.directive.js +0 -37
  487. package/dist/npm/dateinput/localization/messages.js +0 -28
  488. package/dist/npm/dateinput/models/format-placeholder.model.js +0 -6
  489. package/dist/npm/dateinput/models/format-settings.model.js +0 -6
  490. package/dist/npm/dateinput/models/incremental-steps.model.js +0 -6
  491. package/dist/npm/dateinputs.module.js +0 -65
  492. package/dist/npm/datepicker/datepicker.component.js +0 -1258
  493. package/dist/npm/datepicker/datepicker.module.js +0 -57
  494. package/dist/npm/datepicker/localization/datepicker-custom-messages.component.js +0 -45
  495. package/dist/npm/datepicker/localization/datepicker-localized-messages.directive.js +0 -37
  496. package/dist/npm/datepicker/localization/messages.js +0 -36
  497. package/dist/npm/daterange/auto-correct-on.type.js +0 -6
  498. package/dist/npm/daterange/date-range-end-input.directive.js +0 -99
  499. package/dist/npm/daterange/date-range-input.js +0 -133
  500. package/dist/npm/daterange/date-range-popup-template.directive.js +0 -25
  501. package/dist/npm/daterange/date-range-popup.component.js +0 -405
  502. package/dist/npm/daterange/date-range-selection.directive.js +0 -232
  503. package/dist/npm/daterange/date-range-start-input.directive.js +0 -99
  504. package/dist/npm/daterange/date-range.component.js +0 -73
  505. package/dist/npm/daterange/date-range.module.js +0 -85
  506. package/dist/npm/daterange/date-range.service.js +0 -211
  507. package/dist/npm/datetimepicker/datetimepicker.component.js +0 -1311
  508. package/dist/npm/datetimepicker/datetimepicker.module.js +0 -59
  509. package/dist/npm/datetimepicker/localization/datetimepicker-custom-messages.component.js +0 -45
  510. package/dist/npm/datetimepicker/localization/localized-messages.directive.js +0 -37
  511. package/dist/npm/datetimepicker/localization/messages.js +0 -76
  512. package/dist/npm/datetimepicker/models/active-tab.type.js +0 -6
  513. package/dist/npm/defaults.js +0 -26
  514. package/dist/npm/index.js +0 -127
  515. package/dist/npm/main.js +0 -68
  516. package/dist/npm/package-metadata.js +0 -17
  517. package/dist/npm/popup-settings.model.js +0 -6
  518. package/dist/npm/preventable-event.js +0 -31
  519. package/dist/npm/timepicker/localization/messages.js +0 -48
  520. package/dist/npm/timepicker/localization/timepicker-custom-messages.component.js +0 -45
  521. package/dist/npm/timepicker/localization/timepicker-localized-messages.directive.js +0 -37
  522. package/dist/npm/timepicker/localization/timeselector-custom-messages.component.js +0 -47
  523. package/dist/npm/timepicker/localization/timeselector-localized-messages.directive.js +0 -37
  524. package/dist/npm/timepicker/models/incremental-steps.model.js +0 -6
  525. package/dist/npm/timepicker/models/list-item.interface.js +0 -6
  526. package/dist/npm/timepicker/models/list-service-settings.js +0 -6
  527. package/dist/npm/timepicker/models/list-service.interface.js +0 -6
  528. package/dist/npm/timepicker/models/time-part.default.js +0 -16
  529. package/dist/npm/timepicker/services/dayperiod.service.js +0 -136
  530. package/dist/npm/timepicker/services/dom.service.js +0 -70
  531. package/dist/npm/timepicker/services/hours.service.js +0 -134
  532. package/dist/npm/timepicker/services/milliseconds.service.js +0 -135
  533. package/dist/npm/timepicker/services/minutes.service.js +0 -132
  534. package/dist/npm/timepicker/services/seconds.service.js +0 -132
  535. package/dist/npm/timepicker/timelist.component.js +0 -299
  536. package/dist/npm/timepicker/timepicker.component.js +0 -1046
  537. package/dist/npm/timepicker/timepicker.module.js +0 -77
  538. package/dist/npm/timepicker/timeselector.component.js +0 -488
  539. package/dist/npm/timepicker/util.js +0 -101
  540. package/dist/npm/touch-enabled.js +0 -11
  541. package/dist/npm/util.js +0 -399
  542. package/dist/npm/validators/disabled-date.validator.js +0 -20
  543. package/dist/npm/validators/disabled-dates-range.validator.js +0 -30
  544. package/dist/npm/validators/incomplete-date.validator.js +0 -20
  545. package/dist/npm/validators/max.validator.js +0 -23
  546. package/dist/npm/validators/min.validator.js +0 -23
  547. package/dist/npm/validators/time-range.validator.js +0 -25
  548. package/dist/npm/virtualization/models/scrollable.interface.js +0 -6
  549. package/dist/npm/virtualization/services/row-height.service.js +0 -74
  550. package/dist/npm/virtualization/services/scroller.service.js +0 -113
  551. package/dist/npm/virtualization/virtualization.component.js +0 -346
  552. package/dist/npm/virtualization/virtualization.module.js +0 -32
  553. package/dist/systemjs/kendo-angular-dateinputs.js +0 -5
@@ -1,1309 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, HostBinding, ViewChild, ElementRef, Input, isDevMode, TemplateRef, ChangeDetectorRef, Output, EventEmitter, NgZone, ViewContainerRef, forwardRef, ContentChild, Inject, ChangeDetectionStrategy, Renderer2 } from '@angular/core';
7
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
8
- import { Subscription, fromEvent } from 'rxjs';
9
- import { tap } from 'rxjs/operators';
10
- import { cloneDate, isEqual, getDate } from '@progress/kendo-date-math';
11
- import { PopupService } from '@progress/kendo-angular-popup';
12
- import { IntlService } from '@progress/kendo-angular-intl';
13
- import { hasObservers, KendoInput, Keys, guid } from '@progress/kendo-angular-common';
14
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
15
- import { validatePackage } from '@progress/kendo-licensing';
16
- import { packageMetadata } from '../package-metadata';
17
- import { PickerService } from '../common/picker.service';
18
- import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
19
- import { isPresent } from '../common/utils';
20
- import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass } from '../util';
21
- import { PreventableEvent } from '../preventable-event';
22
- import { minValidator } from '../validators/min.validator';
23
- import { maxValidator } from '../validators/max.validator';
24
- import { disabledDatesValidator } from '../validators/disabled-date.validator';
25
- import { TIME_PART } from '../timepicker/models/time-part.default';
26
- import { MIN_DATE, MAX_DATE, MIN_TIME, MAX_TIME } from '../defaults';
27
- import { TOUCH_ENABLED } from '../touch-enabled';
28
- import { CellTemplateDirective } from '../calendar/templates/cell-template.directive';
29
- import { MonthCellTemplateDirective } from '../calendar/templates/month-cell-template.directive';
30
- import { YearCellTemplateDirective } from '../calendar/templates/year-cell-template.directive';
31
- import { DecadeCellTemplateDirective } from '../calendar/templates/decade-cell-template.directive';
32
- import { CenturyCellTemplateDirective } from '../calendar/templates/century-cell-template.directive';
33
- import { WeekNumberCellTemplateDirective } from '../calendar/templates/weeknumber-cell-template.directive';
34
- import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title-template.directive';
35
- import { incompleteDateValidator } from '../validators/incomplete-date.validator';
36
- var timeFormatRegExp = new RegExp(TIME_PART.hour + "|" + TIME_PART.minute + "|" + TIME_PART.second + "|" + TIME_PART.dayperiod + "|literal");
37
- var VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/integration-with-json/';
38
- var MIN_MAX_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/date-time-limits/';
39
- var DEFAULT_ACTIVE_TAB = 'date';
40
- var DEFAULT_DATEINPUT_FORMAT = 'g';
41
- var DEFAULT_TIMESELECTOR_FORMAT = 't';
42
- var TWO_DIGIT_YEAR_MAX = 68;
43
- /**
44
- * Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
45
- */
46
- var DateTimePickerComponent = /** @class */ (function () {
47
- function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled, localization, disabledDatesService, renderer) {
48
- this.popupService = popupService;
49
- this.intl = intl;
50
- this.cdr = cdr;
51
- this.pickerService = pickerService;
52
- this.ngZone = ngZone;
53
- this.wrapper = wrapper;
54
- this.touchEnabled = touchEnabled;
55
- this.localization = localization;
56
- this.disabledDatesService = disabledDatesService;
57
- this.renderer = renderer;
58
- /**
59
- * @hidden
60
- */
61
- this.hostClasses = true;
62
- /**
63
- * The maximum year to assume to be from the current century when typing two-digit year value
64
- * ([see example]({% slug formats_datetimepicker %}#toc-two-digit-year-format)).
65
- *
66
- * The default value is 68, indicating that typing any value less than 69
67
- * will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
68
- */
69
- this.twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
70
- /**
71
- * @hidden
72
- */
73
- this.focusableId = "k-" + guid();
74
- /**
75
- * Sets the title of the input element of the DateTimePicker.
76
- */
77
- this.title = '';
78
- /**
79
- * Sets or gets the `disabled` property of the DateTimePicker and determines whether the component is active
80
- * ([see example]({% slug disabled_datetimepicker %})).
81
- */
82
- this.disabled = false;
83
- /**
84
- * Sets the read-only state of the DateTimePicker
85
- * ([see example]({% slug readonly_datetimepicker %}#toc-read-only-datetimepicker)).
86
- */
87
- this.readonly = false;
88
- /**
89
- * Sets the read-only state of the DateTimePicker input field
90
- * ([see example]({% slug readonly_datetimepicker %}#toc-read-only-input)).
91
- *
92
- * > Note that if you set the [`readonly`]({% slug api_dateinputs_datetimepickercomponent %}#toc-readonly) property value to `true`,
93
- * the input will be rendered in a read-only state regardless of the `readOnlyInput` value.
94
- */
95
- this.readOnlyInput = false;
96
- /**
97
- * Determines whether to display the **Cancel** button in the popup
98
- * ([see example]({% slug datetimepicker_popup_options %}#toc-toggling-the-cancel-button)).
99
- */
100
- this.cancelButton = true;
101
- /**
102
- * Configures the incremental steps of the DateInput and the popup component of the TimePicker
103
- * ([see example]({% slug incrementalsteps_datetimepicker %})).
104
- */
105
- this.steps = {};
106
- /**
107
- * Specifies the Calendar type.
108
- *
109
- * The possible values are:
110
- * - `infinite` (default)
111
- * - `classic`
112
- *
113
- */
114
- this.calendarType = 'infinite';
115
- /**
116
- * Determines whether to enable animation when navigating to previous/next Calendar view.
117
- * Applies to the [`classic`]({% slug api_dateinputs_datetimepickercomponent %}#toc-calendartype) Calendar only.
118
- *
119
- * > This feature uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). In order to run the animation in browsers that do not support it, you need the `web-animations-js` polyfill.
120
- *
121
- * @default false
122
- */
123
- this.animateCalendarNavigation = false;
124
- /**
125
- * Determines whether to display a week number column in the `month` view of the popup Calendar
126
- * ([see example]({% slug datetimepicker_calendar_options %}#toc-week-number-column)).
127
- */
128
- this.weekNumber = false;
129
- /**
130
- * Determines whether the built-in min or max validators are enforced when validating a form
131
- * ([see example]({% slug dateranges_datetimepicker %}#toc-prevent-invalid-input)).
132
- */
133
- this.rangeValidation = true;
134
- /**
135
- * Determines whether the built-in validator for disabled
136
- * date ranges is enforced when validating a form
137
- * ([see example]({% slug disabled_dates_datetimepicker %}#toc-validation)).
138
- */
139
- this.disabledDatesValidation = true;
140
- /**
141
- * Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
142
- */
143
- this.incompleteDateValidation = false;
144
- /**
145
- * Fires each time the user selects a new value.
146
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
147
- */
148
- this.valueChange = new EventEmitter();
149
- /**
150
- * Fires each time the popup is about to open.
151
- * This event is preventable. If you cancel the event by setting `event.preventDefault()`, the popup will remain closed.
152
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
153
- */
154
- this.open = new EventEmitter();
155
- /**
156
- * Fires each time the popup is about to close.
157
- * This event is preventable. If you cancel the event by setting `event.preventDefault()`, the popup will remain open.
158
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
159
- */
160
- this.close = new EventEmitter();
161
- /**
162
- * Fires each time the user focuses the component.
163
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
164
- */
165
- this.onFocus = new EventEmitter();
166
- /**
167
- * Fires each time the user blurs the component.
168
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
169
- */
170
- this.onBlur = new EventEmitter();
171
- /**
172
- * @hidden
173
- *
174
- * Controls whether the Calendar or the TimeSelector will be displayed.
175
- */
176
- this.activeTab = DEFAULT_ACTIVE_TAB;
177
- /**
178
- * @hidden
179
- *
180
- * Specifies the stripped time-related format that is used in the TimeSelector.
181
- * Updates each time the `format` property value changes.
182
- */
183
- this.timeSelectorFormat = DEFAULT_TIMESELECTOR_FORMAT;
184
- /**
185
- * @hidden
186
- */
187
- this.timeSelectorMin = cloneDate(MIN_TIME);
188
- /**
189
- * @hidden
190
- */
191
- this.timeSelectorMax = cloneDate(MAX_TIME);
192
- /**
193
- * @hidden
194
- */
195
- this.calendarValue = null;
196
- /**
197
- * @hidden
198
- */
199
- this.calendarMin = cloneDate(MIN_DATE);
200
- /**
201
- * @hidden
202
- */
203
- this.calendarMax = lastMillisecondOfDate(MAX_DATE);
204
- this._popupSettings = { animate: true };
205
- this._value = null;
206
- this._format = DEFAULT_DATEINPUT_FORMAT;
207
- this._tabindex = 0;
208
- this._defaultTab = DEFAULT_ACTIVE_TAB;
209
- this._min = mergeDateAndTime(MIN_DATE, MIN_TIME);
210
- this._max = mergeDateAndTime(MAX_DATE, MAX_TIME);
211
- this._isActive = false;
212
- this.onControlTouched = noop;
213
- this.onControlChange = noop;
214
- this.onValidatorChange = noop;
215
- this.minValidateFn = noop;
216
- this.maxValidateFn = noop;
217
- this.disabledDatesValidateFn = noop;
218
- this.incompleteValidator = noop;
219
- this.subscriptions = new Subscription();
220
- this._size = 'medium';
221
- this._rounded = 'medium';
222
- this._fillMode = 'solid';
223
- validatePackage(packageMetadata);
224
- }
225
- DateTimePickerComponent_1 = DateTimePickerComponent;
226
- Object.defineProperty(DateTimePickerComponent.prototype, "disabledClass", {
227
- /**
228
- * @hidden
229
- */
230
- get: function () {
231
- return this.disabled;
232
- },
233
- enumerable: true,
234
- configurable: true
235
- });
236
- Object.defineProperty(DateTimePickerComponent.prototype, "input", {
237
- /**
238
- * @hidden
239
- */
240
- get: function () {
241
- return this.pickerService.input;
242
- },
243
- enumerable: true,
244
- configurable: true
245
- });
246
- Object.defineProperty(DateTimePickerComponent.prototype, "calendar", {
247
- /**
248
- * @hidden
249
- */
250
- get: function () {
251
- return this.pickerService.calendar;
252
- },
253
- enumerable: true,
254
- configurable: true
255
- });
256
- Object.defineProperty(DateTimePickerComponent.prototype, "timeSelector", {
257
- /**
258
- * @hidden
259
- */
260
- get: function () {
261
- return this.pickerService.timeSelector;
262
- },
263
- enumerable: true,
264
- configurable: true
265
- });
266
- Object.defineProperty(DateTimePickerComponent.prototype, "value", {
267
- get: function () {
268
- return this._value;
269
- },
270
- /**
271
- * Specifies the value of the DateTimePicker component.
272
- *
273
- * > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
274
- */
275
- set: function (value) {
276
- this.verifyValue(value);
277
- this._value = cloneDate(value);
278
- this.setCalendarValue(value);
279
- this.cdr.markForCheck();
280
- },
281
- enumerable: true,
282
- configurable: true
283
- });
284
- Object.defineProperty(DateTimePickerComponent.prototype, "format", {
285
- get: function () {
286
- return this._format;
287
- },
288
- /**
289
- * Specifies the date format for displaying the input value
290
- * ([see example]({% slug formats_datetimepicker %}))
291
- *
292
- * Format value options:
293
- * - `string` - Provide a `string` if a single format is going to be used regardless whether the input is focused or blurred.
294
- * - [`FormatSettings`]({% slug api_dateinputs_formatsettings %}) - To display different formats when the component is focused or blurred, provide a settings object with specified `inputFormat` and `displayFormat` values.
295
- *
296
- * > If a [`FormatSettings`]({% slug api_dateinputs_formatsettings %}) object is provided, the `displayFormat` value will be used for the popup TimePicker.
297
- */
298
- set: function (format) {
299
- this._format = format;
300
- var displayFormat = this.getDisplayFormat(format);
301
- this.timeSelectorFormat = this.getTimeSelectorFormat(displayFormat);
302
- },
303
- enumerable: true,
304
- configurable: true
305
- });
306
- Object.defineProperty(DateTimePickerComponent.prototype, "tabindex", {
307
- get: function () {
308
- return this.disabled ? -1 : this._tabindex;
309
- },
310
- /**
311
- * Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the DateTimePicker.
312
- */
313
- set: function (value) {
314
- var tabindex = Number(value);
315
- var defaultValue = 0;
316
- this._tabindex = !isNaN(tabindex) ? tabindex : defaultValue;
317
- },
318
- enumerable: true,
319
- configurable: true
320
- });
321
- Object.defineProperty(DateTimePickerComponent.prototype, "disabledDates", {
322
- get: function () {
323
- return this._disabledDates;
324
- },
325
- /**
326
- * Sets the dates of the DateTimePicker that will be disabled
327
- * ([see example]({% slug disabled_dates_datetimepicker %})).
328
- */
329
- set: function (value) {
330
- this._disabledDates = value;
331
- this.disabledDatesService.initialize(value);
332
- },
333
- enumerable: true,
334
- configurable: true
335
- });
336
- Object.defineProperty(DateTimePickerComponent.prototype, "popupSettings", {
337
- get: function () {
338
- return this._popupSettings;
339
- },
340
- /**
341
- * Configures the popup settings of the DateTimePicker
342
- * ([see example]({% slug datetimepicker_popup_options %}#toc-customizing-the-popup)).
343
- *
344
- * The available options are:
345
- * - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
346
- * - `appendTo: 'root' | 'component' | ViewContainerRef`—Controls the popup container. By default, the popup will be appended to the root component.
347
- * - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
348
- */
349
- set: function (settings) {
350
- this._popupSettings = Object.assign({}, { animate: true }, settings);
351
- },
352
- enumerable: true,
353
- configurable: true
354
- });
355
- Object.defineProperty(DateTimePickerComponent.prototype, "min", {
356
- get: function () {
357
- return this._min;
358
- },
359
- /**
360
- * Specifies the smallest valid date.
361
- * The Calendar will not display dates before this value.
362
- * If the `min` value of the Calendar is selected, the TimePicker will not display
363
- * time entries before the specified time portion of this value
364
- * ([see example]({% slug dateranges_datetimepicker %})).
365
- */
366
- set: function (value) {
367
- if (!isPresent(value)) {
368
- return;
369
- }
370
- this._min = cloneDate(value);
371
- this.calendarMin = getDate(value);
372
- },
373
- enumerable: true,
374
- configurable: true
375
- });
376
- Object.defineProperty(DateTimePickerComponent.prototype, "max", {
377
- get: function () {
378
- return this._max;
379
- },
380
- /**
381
- * Specifies the biggest valid date.
382
- * The Calendar will not display dates after this value.
383
- * If the `max` value of the Calendar is selected, the TimePicker will not display
384
- * time entries after the specified time portion of this value
385
- * ([see example]({% slug dateranges_datetimepicker %})).
386
- */
387
- set: function (value) {
388
- if (!isPresent(value)) {
389
- return;
390
- }
391
- this._max = cloneDate(value);
392
- this.calendarMax = lastMillisecondOfDate(value);
393
- },
394
- enumerable: true,
395
- configurable: true
396
- });
397
- Object.defineProperty(DateTimePickerComponent.prototype, "isOpen", {
398
- /**
399
- * Indicates whether the component is currently open.
400
- */
401
- get: function () {
402
- return isPresent(this.popupRef);
403
- },
404
- enumerable: true,
405
- configurable: true
406
- });
407
- Object.defineProperty(DateTimePickerComponent.prototype, "isActive", {
408
- /**
409
- * Indicates whether the component or its popup content is focused.
410
- */
411
- get: function () {
412
- return this._isActive;
413
- },
414
- set: function (value) {
415
- if (value) {
416
- this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
417
- }
418
- else {
419
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
420
- }
421
- this._isActive = value;
422
- },
423
- enumerable: true,
424
- configurable: true
425
- });
426
- Object.defineProperty(DateTimePickerComponent.prototype, "defaultTab", {
427
- get: function () {
428
- return this._defaultTab;
429
- },
430
- /**
431
- * Sets the active tab on opening the popup
432
- * ([see example]({% slug datetimepicker_popup_options %}#toc-setting-the-default-tab)).
433
- */
434
- set: function (tab) {
435
- this._defaultTab = tab || DEFAULT_ACTIVE_TAB;
436
- this.activeTab = this.defaultTab;
437
- },
438
- enumerable: true,
439
- configurable: true
440
- });
441
- Object.defineProperty(DateTimePickerComponent.prototype, "size", {
442
- get: function () {
443
- return this._size;
444
- },
445
- /**
446
- * Sets the size of the component.
447
- *
448
- * The possible values are:
449
- * * `'small'`
450
- * * `'medium'` (Default)
451
- * * `'large'`
452
- * * `null`
453
- *
454
- */
455
- set: function (size) {
456
- this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
457
- this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
458
- if (size) {
459
- this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
460
- this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
461
- }
462
- this._size = size;
463
- },
464
- enumerable: true,
465
- configurable: true
466
- });
467
- Object.defineProperty(DateTimePickerComponent.prototype, "rounded", {
468
- get: function () {
469
- return this._rounded;
470
- },
471
- /**
472
- * Sets the border radius of the component.
473
- *
474
- * The possible values are:
475
- * * `'small'`
476
- * * `'medium'` (Default)
477
- * * `'large'`
478
- * * `'full'`
479
- * * `null`
480
- *
481
- */
482
- set: function (rounded) {
483
- this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
484
- if (rounded) {
485
- this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
486
- }
487
- this._rounded = rounded;
488
- },
489
- enumerable: true,
490
- configurable: true
491
- });
492
- Object.defineProperty(DateTimePickerComponent.prototype, "fillMode", {
493
- get: function () {
494
- return this._fillMode;
495
- },
496
- /**
497
- * Sets the fillMode of the component.
498
- *
499
- * The possible values are:
500
- * * `'solid'` (Default)
501
- * * `'flat'`
502
- * * `'outline'`
503
- * * `null`
504
- *
505
- */
506
- set: function (fillMode) {
507
- this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
508
- this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
509
- this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
510
- if (fillMode) {
511
- this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
512
- this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
513
- this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
514
- }
515
- this._fillMode = fillMode;
516
- },
517
- enumerable: true,
518
- configurable: true
519
- });
520
- Object.defineProperty(DateTimePickerComponent.prototype, "tabSwitchTransition", {
521
- /**
522
- * @hidden
523
- */
524
- get: function () {
525
- /*
526
- When the popup is opening, disables the set transition in the themes. When `defaultTab` is set to `time`,
527
- the popup opens with an active **Time** tab and the animation of the initial transition is undesired.
528
- Setting the inline transition style to `none` overrides the set animation in the themes.
529
- Setting the inline transition style to `null` does not apply any inline styles or override the themes CSS.
530
- */
531
- return this.isOpen ? null : 'none';
532
- },
533
- enumerable: true,
534
- configurable: true
535
- });
536
- Object.defineProperty(DateTimePickerComponent.prototype, "disableCalendar", {
537
- /**
538
- * @hidden
539
- *
540
- * Indicates whether the Calendar will be disabled.
541
- * The inactive tab component gets disabled and becomes inaccessible on tab click.
542
- */
543
- get: function () {
544
- return this.activeTab !== 'date' && !this.calendar.isActive;
545
- },
546
- enumerable: true,
547
- configurable: true
548
- });
549
- Object.defineProperty(DateTimePickerComponent.prototype, "inputRole", {
550
- /**
551
- * @hidden
552
- */
553
- get: function () {
554
- return this.readOnlyInput ? 'listbox' : 'spinbutton';
555
- },
556
- enumerable: true,
557
- configurable: true
558
- });
559
- Object.defineProperty(DateTimePickerComponent.prototype, "disableTimeSelector", {
560
- /**
561
- * @hidden
562
- *
563
- * Indicates whether the TimeSelector will be disabled.
564
- * The inactive tab component gets disabled and becomes inaccessible on tab click.
565
- */
566
- get: function () {
567
- return this.activeTab !== 'time' && !this.timeSelector.isActive;
568
- },
569
- enumerable: true,
570
- configurable: true
571
- });
572
- Object.defineProperty(DateTimePickerComponent.prototype, "activeTabComponent", {
573
- get: function () {
574
- if (!this.isOpen) {
575
- return;
576
- }
577
- if (!(isPresent(this.calendar) || isPresent(this.timeSelector))) {
578
- this.cdr.detectChanges();
579
- }
580
- return this.activeTab === 'date' ? this.calendar : this.timeSelector;
581
- },
582
- enumerable: true,
583
- configurable: true
584
- });
585
- Object.defineProperty(DateTimePickerComponent.prototype, "appendTo", {
586
- get: function () {
587
- var appendTo = this.popupSettings.appendTo;
588
- if (!isPresent(appendTo) || appendTo === 'root') {
589
- return undefined;
590
- }
591
- return appendTo === 'component' ? this.container : appendTo;
592
- },
593
- enumerable: true,
594
- configurable: true
595
- });
596
- DateTimePickerComponent.prototype.ngOnInit = function () {
597
- var _this = this;
598
- this.subscriptions.add(this.pickerService.onFocus
599
- // detect popup changes to disable the inactive view mark-up when the popup is open
600
- .pipe(tap(this.detectPopupChanges.bind(this)))
601
- .subscribe(this.handleFocus.bind(this)));
602
- this.subscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
603
- this.subscriptions.add(this.pickerService.sameDateSelected.subscribe(this.handleCalendarValueChange.bind(this)));
604
- this.subscriptions.add(this.localization.changes.subscribe(function () { return _this.cdr.markForCheck(); }));
605
- this.subscriptions.add(this.pickerService.dateCompletenessChange.subscribe(this.handleDateCompletenessChange.bind(this)));
606
- if (isWindowAvailable()) {
607
- this.subscriptions.add(this.ngZone.runOutsideAngular(function () { return fromEvent(window, 'blur').subscribe(_this.handleCancel.bind(_this)); }));
608
- }
609
- };
610
- DateTimePickerComponent.prototype.ngAfterViewInit = function () {
611
- this.setComponentClasses();
612
- };
613
- DateTimePickerComponent.prototype.ngOnChanges = function (changes) {
614
- if (isPresent(changes.min) || isPresent(changes.max)) {
615
- this.verifyMinMaxRange();
616
- }
617
- if (changes.min || changes.max || changes.rangeValidation || changes.disabledDatesValidation || changes.disabledDates || changes.incompleteDateValidation) {
618
- this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop;
619
- this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop;
620
- this.disabledDatesValidateFn = this.disabledDatesValidation ? disabledDatesValidator(this.disabledDatesService.isDateDisabled) : noop;
621
- this.incompleteValidator = this.incompleteDateValidation ? incompleteDateValidator() : noop;
622
- this.onValidatorChange();
623
- }
624
- };
625
- DateTimePickerComponent.prototype.ngOnDestroy = function () {
626
- if (this.isOpen) {
627
- this.closePopup();
628
- }
629
- this.subscriptions.unsubscribe();
630
- };
631
- /**
632
- * * If the popup is closed, focuses the DateTimePicker input.
633
- * * If the popup is open, the focus is moved to its content.
634
- */
635
- DateTimePickerComponent.prototype.focus = function () {
636
- if (this.disabled) {
637
- return;
638
- }
639
- if (this.isOpen) {
640
- this.activeTabComponent.focus();
641
- }
642
- else {
643
- this.input.focus();
644
- }
645
- };
646
- /**
647
- * Blurs the DateTimePicker.
648
- */
649
- DateTimePickerComponent.prototype.blur = function () {
650
- if (this.isOpen && this.activeTabComponent.isActive) {
651
- this.activeTabComponent.blur();
652
- }
653
- else {
654
- this.input.blur();
655
- }
656
- };
657
- /**
658
- * Toggles the visibility of the popup. If you use the `toggle` method to show or hide the popup,
659
- * the `open` and `close` events do not fire.
660
- * ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
661
- *
662
- * @param show - The state of the popup.
663
- */
664
- DateTimePickerComponent.prototype.toggle = function (show) {
665
- if (this.disabled || this.readonly || show === this.isOpen) {
666
- return;
667
- }
668
- var shouldOpen = isPresent(show) ? show : !this.isOpen;
669
- if (shouldOpen) {
670
- this.openPopup();
671
- }
672
- else {
673
- this.closePopup();
674
- // Changes the tab and the calendar or clock icon to the designated default.
675
- if (this.activeTab !== this.defaultTab) {
676
- this.activeTab = this.defaultTab;
677
- this.cdr.detectChanges();
678
- }
679
- }
680
- };
681
- /**
682
- * @hidden
683
- */
684
- DateTimePickerComponent.prototype.writeValue = function (value) {
685
- this.value = value;
686
- };
687
- /**
688
- * @hidden
689
- */
690
- DateTimePickerComponent.prototype.registerOnChange = function (fn) {
691
- this.onControlChange = fn;
692
- };
693
- /**
694
- * @hidden
695
- */
696
- DateTimePickerComponent.prototype.registerOnTouched = function (fn) {
697
- this.onControlTouched = fn;
698
- };
699
- /**
700
- * @hidden
701
- */
702
- DateTimePickerComponent.prototype.setDisabledState = function (disabled) {
703
- this.disabled = disabled;
704
- this.cdr.markForCheck();
705
- };
706
- /**
707
- * @hidden
708
- */
709
- DateTimePickerComponent.prototype.validate = function (control) {
710
- return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesValidateFn(control) || this.incompleteValidator(control, this.input && this.input.isDateIncomplete);
711
- };
712
- /**
713
- * @hidden
714
- */
715
- DateTimePickerComponent.prototype.registerOnValidatorChange = function (fn) {
716
- this.onValidatorChange = fn;
717
- };
718
- /**
719
- * @hidden
720
- *
721
- * Used by the TextBoxContainer to determine if the floating label will render in the input.
722
- */
723
- DateTimePickerComponent.prototype.isEmpty = function () {
724
- return !isPresent(this.value) && this.input.isEmpty();
725
- };
726
- /**
727
- * @hidden
728
- */
729
- DateTimePickerComponent.prototype.handleIconClick = function (event) {
730
- var _this = this;
731
- if (this.disabled || this.readonly) {
732
- return;
733
- }
734
- // prevents the event default to evade focusing the DateInput input when placed inside a label (FF/IE/Edge)
735
- event.preventDefault();
736
- var runInZone = !this.isOpen || hasObservers(this.close);
737
- this.run(runInZone, function () {
738
- var shouldOpen = !_this.isOpen;
739
- // handle focus first to maintain correct event order `focus` => `open`
740
- _this.handleFocus();
741
- _this.togglePopup(shouldOpen);
742
- _this.switchFocus();
743
- });
744
- };
745
- /**
746
- * @hidden
747
- */
748
- DateTimePickerComponent.prototype.handleFocus = function () {
749
- var _this = this;
750
- if (this.isActive) {
751
- return;
752
- }
753
- this.isActive = true;
754
- if (hasObservers(this.onFocus)) {
755
- this.ngZone.run(function () { return _this.onFocus.emit(); });
756
- }
757
- };
758
- /**
759
- * @hidden
760
- */
761
- DateTimePickerComponent.prototype.handleBlur = function (event) {
762
- var _this = this;
763
- if (!this.isActive || this.focusTargetInComponent(event)) {
764
- return;
765
- }
766
- this.isActive = false;
767
- var isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
768
- var runInZone = isNgControlUntouched || hasObservers(this.onBlur) || (this.isOpen && hasObservers(this.close));
769
- this.run(runInZone, function () {
770
- _this.onBlur.emit();
771
- _this.onControlTouched();
772
- _this.togglePopup(false);
773
- _this.cdr.markForCheck();
774
- });
775
- };
776
- /**
777
- * @hidden
778
- */
779
- DateTimePickerComponent.prototype.changeActiveTab = function (tab) {
780
- if (!this.isOpen || this.activeTab === tab) {
781
- return;
782
- }
783
- // persists the Tcurrent value of the TimeSelector when switching between tabs
784
- if (!isEqual(this.timeSelector.value, this.timeSelector.current)) {
785
- this.timeSelector.handleAccept();
786
- }
787
- this.activeTab = tab;
788
- this.cdr.detectChanges();
789
- this.detectPopupChanges();
790
- };
791
- /**
792
- * @hidden
793
- */
794
- DateTimePickerComponent.prototype.handleTabChangeTransitionEnd = function (dateTimeSelector, event) {
795
- // handle only the .k-datetime-selector element transition, ignore any child element transitions
796
- if (event.target !== dateTimeSelector) {
797
- return;
798
- }
799
- this.activeTabComponent.focus();
800
- };
801
- /**
802
- * @hidden
803
- */
804
- DateTimePickerComponent.prototype.handleAccept = function () {
805
- var _this = this;
806
- if (!this.isOpen) {
807
- return;
808
- }
809
- var candidate = mergeDateAndTime(this.calendar.value, this.timeSelector.current);
810
- var valueChangePresent = !isEqual(this.value, candidate);
811
- var runInZone = valueChangePresent || hasObservers(this.close);
812
- this.run(runInZone, function () {
813
- _this.handleValueChange(candidate);
814
- _this.togglePopup(false);
815
- });
816
- };
817
- /**
818
- * @hidden
819
- */
820
- DateTimePickerComponent.prototype.handleCancel = function () {
821
- var _this = this;
822
- if (!this.isOpen) {
823
- return;
824
- }
825
- var runInZone = hasObservers(this.close);
826
- this.run(runInZone, function () { return _this.togglePopup(false); });
827
- };
828
- /**
829
- * @hidden
830
- */
831
- DateTimePickerComponent.prototype.handleInputValueChange = function (value) {
832
- this.handleValueChange(value);
833
- if (this.isOpen) {
834
- this.togglePopup(false);
835
- }
836
- };
837
- /**
838
- * @hidden
839
- */
840
- DateTimePickerComponent.prototype.handleCalendarValueChange = function () {
841
- this.setTimeSelectorMinMax(this.calendar.value);
842
- this.changeActiveTab('time');
843
- };
844
- /**
845
- * @hidden
846
- */
847
- DateTimePickerComponent.prototype.handleKeyDown = function (event) {
848
- var _this = this;
849
- if (this.disabled || this.readonly) {
850
- return;
851
- }
852
- var _a = event, keyCode = _a.keyCode, altKey = _a.altKey;
853
- switch (keyCode) {
854
- case altKey && Keys.ArrowUp:
855
- case Keys.Escape:
856
- this.handleCancel();
857
- break;
858
- case !this.isOpen && altKey && Keys.ArrowDown:
859
- this.ngZone.run(function () { return _this.togglePopup(true); });
860
- break;
861
- case altKey && Keys.ArrowRight:
862
- this.changeActiveTab('time');
863
- break;
864
- case altKey && Keys.ArrowLeft:
865
- this.changeActiveTab('date');
866
- break;
867
- case this.isOpen && this.timeSelector.isActive && isPresent(this.calendarValue) && Keys.Enter:
868
- this.handleAccept();
869
- break;
870
- default: return;
871
- }
872
- event.preventDefault();
873
- };
874
- /**
875
- * @hidden
876
- */
877
- DateTimePickerComponent.prototype.handleTabOut = function (event) {
878
- var _a = event, keyCode = _a.keyCode, shiftKey = _a.shiftKey, target = _a.target;
879
- // if no focusable next sibling elements exist in the controls sections, the user is tabbing out of the popup
880
- var focusableSiblingAvailable = isPresent(target.nextElementSibling) && !target.nextElementSibling.disabled;
881
- if (keyCode === Keys.Tab && !shiftKey && !focusableSiblingAvailable) {
882
- this.input.focus();
883
- this.handleCancel();
884
- }
885
- };
886
- /**
887
- * @hidden
888
- */
889
- DateTimePickerComponent.prototype.handleBackTabOut = function (event) {
890
- var _a = event, keyCode = _a.keyCode, shiftKey = _a.shiftKey;
891
- if (keyCode === Keys.Tab && shiftKey) {
892
- this.input.focus();
893
- }
894
- };
895
- /**
896
- * @hidden
897
- */
898
- DateTimePickerComponent.prototype.popupButtonsClasses = function (type) {
899
- var buttonType = type ? type : 'base';
900
- return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : '');
901
- };
902
- /**
903
- * @hidden
904
- *
905
- * Prevents the diversion of the focus from the currently active element in the component.
906
- */
907
- DateTimePickerComponent.prototype.preventMouseDown = function (event) {
908
- event.preventDefault();
909
- };
910
- DateTimePickerComponent.prototype.verifyValue = function (value) {
911
- if (!isDevMode()) {
912
- return;
913
- }
914
- if (isPresent(value) && !(value instanceof Date)) {
915
- throw new Error("The 'value' should be a valid JavaScript Date instance. Check " + VALUE_DOC_LINK + " for possible resolution.");
916
- }
917
- };
918
- DateTimePickerComponent.prototype.verifyMinMaxRange = function () {
919
- if (!isDevMode()) {
920
- return;
921
- }
922
- if (!isValidRange(this.min, this.max)) {
923
- throw new Error("The max value should be bigger than the min. See " + MIN_MAX_DOC_LINK + ".");
924
- }
925
- };
926
- /**
927
- * Extracts the time slots and the literals that are not preceded by date parts
928
- * and concatenates the resulting parts into a string.
929
- * If the provided format value does not contain any time parts,
930
- * returns the designated format of the default popup component of the TimePicker.
931
- */
932
- DateTimePickerComponent.prototype.getTimeSelectorFormat = function (format) {
933
- var timeSelectorFormat = this.intl
934
- .splitDateFormat(format)
935
- .filter(this.timeFormatPartFilter)
936
- .reduce(function (format, part) { return format += part.pattern; }, '');
937
- return timeSelectorFormat || DEFAULT_TIMESELECTOR_FORMAT;
938
- };
939
- /**
940
- * Extracts the `displayFormat` from the provided `string | FormatSettings` value.
941
- * Fallbacks to the default input value, if a falsy value param is passed.
942
- */
943
- DateTimePickerComponent.prototype.getDisplayFormat = function (format) {
944
- if (!format) {
945
- return DEFAULT_DATEINPUT_FORMAT;
946
- }
947
- if (typeof format === 'string') {
948
- return format;
949
- }
950
- else {
951
- return format.displayFormat;
952
- }
953
- };
954
- /**
955
- * The filter expression that filters out all format parts
956
- * except for `hour`, `minute`, `second`, `dayperiod`, and specific literals.
957
- * Literals will be left only if they are not preceded by date parts.
958
- */
959
- DateTimePickerComponent.prototype.timeFormatPartFilter = function (part, index, parts) {
960
- var previousPart = index >= 1 && parts[index - 1];
961
- if (previousPart && part.type === 'literal') {
962
- return timeFormatRegExp.test(previousPart.type);
963
- }
964
- return timeFormatRegExp.test(part.type);
965
- };
966
- DateTimePickerComponent.prototype.togglePopup = function (open) {
967
- if (open === this.isOpen) {
968
- return;
969
- }
970
- var event = new PreventableEvent();
971
- open ? this.open.emit(event) : this.close.emit(event);
972
- if (event.isDefaultPrevented()) {
973
- return;
974
- }
975
- this.toggle(open);
976
- this.switchFocus();
977
- };
978
- DateTimePickerComponent.prototype.switchFocus = function () {
979
- if (!this.isActive) {
980
- return;
981
- }
982
- if (this.isOpen) {
983
- this.activeTabComponent.focus();
984
- }
985
- else if (!this.touchEnabled) {
986
- this.input.focus();
987
- }
988
- else if (!this.input.isActive) {
989
- this.handleBlur();
990
- }
991
- };
992
- DateTimePickerComponent.prototype.openPopup = function () {
993
- var _this = this;
994
- this.setCalendarValue(this.value);
995
- this.setTimeSelectorMinMax(this.value);
996
- var direction = this.localization.rtl ? 'right' : 'left';
997
- this.popupRef = this.popupService.open({
998
- anchor: this.wrapper,
999
- content: this.popupTemplate,
1000
- positionMode: 'absolute',
1001
- animate: this.popupSettings.animate,
1002
- appendTo: this.appendTo,
1003
- popupClass: "k-datetime-container " + (this.popupSettings.popupClass || ''),
1004
- anchorAlign: { vertical: 'bottom', horizontal: direction },
1005
- popupAlign: { vertical: 'top', horizontal: direction }
1006
- });
1007
- this.popupRef.popupAnchorViewportLeave.subscribe(function () { return _this.handleCancel(); });
1008
- };
1009
- DateTimePickerComponent.prototype.closePopup = function () {
1010
- if (!this.isOpen) {
1011
- return;
1012
- }
1013
- this.popupRef.close();
1014
- this.popupRef = null;
1015
- };
1016
- DateTimePickerComponent.prototype.handleValueChange = function (value) {
1017
- if (isEqual(this.value, value)) {
1018
- return;
1019
- }
1020
- this.value = cloneDate(value);
1021
- this.onControlChange(cloneDate(value));
1022
- this.valueChange.emit(cloneDate(value));
1023
- };
1024
- /**
1025
- * Indicates whether the focus target is part of this component,
1026
- * that is, whether the focus target is inside the component or in the popup.
1027
- */
1028
- DateTimePickerComponent.prototype.focusTargetInComponent = function (event) {
1029
- if (!isPresent(event)) {
1030
- return false;
1031
- }
1032
- var relatedTarget = event.relatedTarget || document.activeElement;
1033
- var focusInPopup = isPresent(this.popupRef) && this.popupRef.popupElement.contains(relatedTarget);
1034
- var focusInWrapper = this.wrapper.nativeElement.contains(relatedTarget);
1035
- return focusInPopup || focusInWrapper;
1036
- };
1037
- DateTimePickerComponent.prototype.setTimeSelectorMinMax = function (selectedDate) {
1038
- var minDateSelected = isPresent(selectedDate) && isEqual(getDate(selectedDate), getDate(this.min));
1039
- this.timeSelectorMin = cloneDate(minDateSelected ? this.min : MIN_TIME);
1040
- var maxDateSelected = isPresent(selectedDate) && isEqual(getDate(selectedDate), getDate(this.max));
1041
- this.timeSelectorMax = cloneDate(maxDateSelected ? this.max : MAX_TIME);
1042
- };
1043
- DateTimePickerComponent.prototype.setCalendarValue = function (value) {
1044
- var isInCalendarRange = isPresent(value) && isInRange(value, this.calendarMin, this.calendarMax);
1045
- this.calendarValue = isInCalendarRange ? getDate(value) : null;
1046
- };
1047
- /**
1048
- * If the popup is available, runs a popup change detection.
1049
- */
1050
- DateTimePickerComponent.prototype.detectPopupChanges = function () {
1051
- if (!this.isOpen) {
1052
- return;
1053
- }
1054
- this.popupRef.popup.changeDetectorRef.detectChanges();
1055
- };
1056
- /**
1057
- * Depending on the predicate `runInZone` value that is passed,
1058
- * runs the provided function either in the Angular or in the current zone.
1059
- */
1060
- DateTimePickerComponent.prototype.run = function (runInZone, fn) {
1061
- if (runInZone) {
1062
- this.ngZone.run(function () { return fn(); });
1063
- }
1064
- else {
1065
- fn();
1066
- }
1067
- };
1068
- DateTimePickerComponent.prototype.handleDateCompletenessChange = function () {
1069
- var _this = this;
1070
- this.cdr.markForCheck();
1071
- this.ngZone.run(function () { return _this.onValidatorChange(); });
1072
- };
1073
- DateTimePickerComponent.prototype.setComponentClasses = function () {
1074
- if (this.size) {
1075
- this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
1076
- this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
1077
- }
1078
- if (this.rounded) {
1079
- this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
1080
- }
1081
- if (this.fillMode) {
1082
- this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
1083
- this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
1084
- this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
1085
- }
1086
- };
1087
- var DateTimePickerComponent_1;
1088
- tslib_1.__decorate([
1089
- HostBinding('class.k-datetimepicker'),
1090
- HostBinding('class.k-input'),
1091
- tslib_1.__metadata("design:type", Boolean)
1092
- ], DateTimePickerComponent.prototype, "hostClasses", void 0);
1093
- tslib_1.__decorate([
1094
- HostBinding('class.k-disabled'),
1095
- tslib_1.__metadata("design:type", Boolean),
1096
- tslib_1.__metadata("design:paramtypes", [])
1097
- ], DateTimePickerComponent.prototype, "disabledClass", null);
1098
- tslib_1.__decorate([
1099
- ViewChild('toggleButton', { static: true }),
1100
- tslib_1.__metadata("design:type", ElementRef)
1101
- ], DateTimePickerComponent.prototype, "toggleButton", void 0);
1102
- tslib_1.__decorate([
1103
- Input(),
1104
- tslib_1.__metadata("design:type", Date),
1105
- tslib_1.__metadata("design:paramtypes", [Date])
1106
- ], DateTimePickerComponent.prototype, "value", null);
1107
- tslib_1.__decorate([
1108
- Input(),
1109
- tslib_1.__metadata("design:type", Object),
1110
- tslib_1.__metadata("design:paramtypes", [Object])
1111
- ], DateTimePickerComponent.prototype, "format", null);
1112
- tslib_1.__decorate([
1113
- Input(),
1114
- tslib_1.__metadata("design:type", Number)
1115
- ], DateTimePickerComponent.prototype, "twoDigitYearMax", void 0);
1116
- tslib_1.__decorate([
1117
- Input(),
1118
- tslib_1.__metadata("design:type", Number),
1119
- tslib_1.__metadata("design:paramtypes", [Number])
1120
- ], DateTimePickerComponent.prototype, "tabindex", null);
1121
- tslib_1.__decorate([
1122
- Input(),
1123
- tslib_1.__metadata("design:type", Object),
1124
- tslib_1.__metadata("design:paramtypes", [Object])
1125
- ], DateTimePickerComponent.prototype, "disabledDates", null);
1126
- tslib_1.__decorate([
1127
- Input(),
1128
- tslib_1.__metadata("design:type", Object),
1129
- tslib_1.__metadata("design:paramtypes", [Object])
1130
- ], DateTimePickerComponent.prototype, "popupSettings", null);
1131
- tslib_1.__decorate([
1132
- Input(),
1133
- tslib_1.__metadata("design:type", String)
1134
- ], DateTimePickerComponent.prototype, "focusableId", void 0);
1135
- tslib_1.__decorate([
1136
- Input(),
1137
- tslib_1.__metadata("design:type", String)
1138
- ], DateTimePickerComponent.prototype, "title", void 0);
1139
- tslib_1.__decorate([
1140
- Input(),
1141
- tslib_1.__metadata("design:type", Boolean)
1142
- ], DateTimePickerComponent.prototype, "disabled", void 0);
1143
- tslib_1.__decorate([
1144
- Input(),
1145
- tslib_1.__metadata("design:type", Boolean)
1146
- ], DateTimePickerComponent.prototype, "readonly", void 0);
1147
- tslib_1.__decorate([
1148
- Input(),
1149
- tslib_1.__metadata("design:type", Boolean)
1150
- ], DateTimePickerComponent.prototype, "readOnlyInput", void 0);
1151
- tslib_1.__decorate([
1152
- Input(),
1153
- tslib_1.__metadata("design:type", Boolean)
1154
- ], DateTimePickerComponent.prototype, "cancelButton", void 0);
1155
- tslib_1.__decorate([
1156
- Input(),
1157
- tslib_1.__metadata("design:type", Object)
1158
- ], DateTimePickerComponent.prototype, "formatPlaceholder", void 0);
1159
- tslib_1.__decorate([
1160
- Input(),
1161
- tslib_1.__metadata("design:type", String)
1162
- ], DateTimePickerComponent.prototype, "placeholder", void 0);
1163
- tslib_1.__decorate([
1164
- Input(),
1165
- tslib_1.__metadata("design:type", Object)
1166
- ], DateTimePickerComponent.prototype, "steps", void 0);
1167
- tslib_1.__decorate([
1168
- Input(),
1169
- tslib_1.__metadata("design:type", Date)
1170
- ], DateTimePickerComponent.prototype, "focusedDate", void 0);
1171
- tslib_1.__decorate([
1172
- Input(),
1173
- tslib_1.__metadata("design:type", String)
1174
- ], DateTimePickerComponent.prototype, "calendarType", void 0);
1175
- tslib_1.__decorate([
1176
- Input(),
1177
- tslib_1.__metadata("design:type", Boolean)
1178
- ], DateTimePickerComponent.prototype, "animateCalendarNavigation", void 0);
1179
- tslib_1.__decorate([
1180
- Input(),
1181
- tslib_1.__metadata("design:type", Boolean)
1182
- ], DateTimePickerComponent.prototype, "weekNumber", void 0);
1183
- tslib_1.__decorate([
1184
- Input(),
1185
- tslib_1.__metadata("design:type", Date),
1186
- tslib_1.__metadata("design:paramtypes", [Date])
1187
- ], DateTimePickerComponent.prototype, "min", null);
1188
- tslib_1.__decorate([
1189
- Input(),
1190
- tslib_1.__metadata("design:type", Date),
1191
- tslib_1.__metadata("design:paramtypes", [Date])
1192
- ], DateTimePickerComponent.prototype, "max", null);
1193
- tslib_1.__decorate([
1194
- Input(),
1195
- tslib_1.__metadata("design:type", Boolean)
1196
- ], DateTimePickerComponent.prototype, "rangeValidation", void 0);
1197
- tslib_1.__decorate([
1198
- Input(),
1199
- tslib_1.__metadata("design:type", Boolean)
1200
- ], DateTimePickerComponent.prototype, "disabledDatesValidation", void 0);
1201
- tslib_1.__decorate([
1202
- Input(),
1203
- tslib_1.__metadata("design:type", Boolean)
1204
- ], DateTimePickerComponent.prototype, "incompleteDateValidation", void 0);
1205
- tslib_1.__decorate([
1206
- Output(),
1207
- tslib_1.__metadata("design:type", EventEmitter)
1208
- ], DateTimePickerComponent.prototype, "valueChange", void 0);
1209
- tslib_1.__decorate([
1210
- Output(),
1211
- tslib_1.__metadata("design:type", EventEmitter)
1212
- ], DateTimePickerComponent.prototype, "open", void 0);
1213
- tslib_1.__decorate([
1214
- Output(),
1215
- tslib_1.__metadata("design:type", EventEmitter)
1216
- ], DateTimePickerComponent.prototype, "close", void 0);
1217
- tslib_1.__decorate([
1218
- Output('focus'),
1219
- tslib_1.__metadata("design:type", EventEmitter)
1220
- ], DateTimePickerComponent.prototype, "onFocus", void 0);
1221
- tslib_1.__decorate([
1222
- Output('blur'),
1223
- tslib_1.__metadata("design:type", EventEmitter)
1224
- ], DateTimePickerComponent.prototype, "onBlur", void 0);
1225
- tslib_1.__decorate([
1226
- Input(),
1227
- tslib_1.__metadata("design:type", String),
1228
- tslib_1.__metadata("design:paramtypes", [String])
1229
- ], DateTimePickerComponent.prototype, "defaultTab", null);
1230
- tslib_1.__decorate([
1231
- Input(),
1232
- tslib_1.__metadata("design:type", String),
1233
- tslib_1.__metadata("design:paramtypes", [String])
1234
- ], DateTimePickerComponent.prototype, "size", null);
1235
- tslib_1.__decorate([
1236
- Input(),
1237
- tslib_1.__metadata("design:type", String),
1238
- tslib_1.__metadata("design:paramtypes", [String])
1239
- ], DateTimePickerComponent.prototype, "rounded", null);
1240
- tslib_1.__decorate([
1241
- Input(),
1242
- tslib_1.__metadata("design:type", String),
1243
- tslib_1.__metadata("design:paramtypes", [String])
1244
- ], DateTimePickerComponent.prototype, "fillMode", null);
1245
- tslib_1.__decorate([
1246
- ContentChild(CellTemplateDirective, { static: false }),
1247
- tslib_1.__metadata("design:type", CellTemplateDirective)
1248
- ], DateTimePickerComponent.prototype, "cellTemplate", void 0);
1249
- tslib_1.__decorate([
1250
- ContentChild(MonthCellTemplateDirective, { static: false }),
1251
- tslib_1.__metadata("design:type", MonthCellTemplateDirective)
1252
- ], DateTimePickerComponent.prototype, "monthCellTemplate", void 0);
1253
- tslib_1.__decorate([
1254
- ContentChild(YearCellTemplateDirective, { static: false }),
1255
- tslib_1.__metadata("design:type", YearCellTemplateDirective)
1256
- ], DateTimePickerComponent.prototype, "yearCellTemplate", void 0);
1257
- tslib_1.__decorate([
1258
- ContentChild(DecadeCellTemplateDirective, { static: false }),
1259
- tslib_1.__metadata("design:type", DecadeCellTemplateDirective)
1260
- ], DateTimePickerComponent.prototype, "decadeCellTemplate", void 0);
1261
- tslib_1.__decorate([
1262
- ContentChild(CenturyCellTemplateDirective, { static: false }),
1263
- tslib_1.__metadata("design:type", CenturyCellTemplateDirective)
1264
- ], DateTimePickerComponent.prototype, "centuryCellTemplate", void 0);
1265
- tslib_1.__decorate([
1266
- ContentChild(WeekNumberCellTemplateDirective, { static: false }),
1267
- tslib_1.__metadata("design:type", WeekNumberCellTemplateDirective)
1268
- ], DateTimePickerComponent.prototype, "weekNumberTemplate", void 0);
1269
- tslib_1.__decorate([
1270
- ContentChild(HeaderTitleTemplateDirective, { static: false }),
1271
- tslib_1.__metadata("design:type", HeaderTitleTemplateDirective)
1272
- ], DateTimePickerComponent.prototype, "headerTitleTemplate", void 0);
1273
- tslib_1.__decorate([
1274
- ViewChild('container', { read: ViewContainerRef, static: true }),
1275
- tslib_1.__metadata("design:type", ViewContainerRef)
1276
- ], DateTimePickerComponent.prototype, "container", void 0);
1277
- tslib_1.__decorate([
1278
- ViewChild('popupTemplate', { read: TemplateRef, static: true }),
1279
- tslib_1.__metadata("design:type", TemplateRef)
1280
- ], DateTimePickerComponent.prototype, "popupTemplate", void 0);
1281
- DateTimePickerComponent = DateTimePickerComponent_1 = tslib_1.__decorate([
1282
- Component({
1283
- selector: 'kendo-datetimepicker',
1284
- exportAs: 'kendo-datetimepicker',
1285
- changeDetection: ChangeDetectionStrategy.OnPush,
1286
- providers: [
1287
- PickerService,
1288
- LocalizationService,
1289
- DisabledDatesService,
1290
- { provide: L10N_PREFIX, useValue: 'kendo.datetimepicker' },
1291
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }), multi: true },
1292
- { provide: NG_VALIDATORS, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }), multi: true },
1293
- { provide: KendoInput, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }) }
1294
- ],
1295
- template: "\n <ng-container\n kendoDateTimePickerLocalizedMessages\n\n i18n-dateTab=\"kendo.datetimepicker.dateTab|The Date tab text in the datetimepicker popup header\"\n dateTab=\"Date\"\n\n i18n-dateTabLabel=\"kendo.datetimepicker.dateTabLabel|The label for the Date tab in the datetimepicker popup header\"\n dateTabLabel=\"Date tab\"\n\n i18n-timeTab=\"kendo.datetimepicker.timeTab|The Time tab text in the datetimepicker popup header\"\n timeTab=\"Time\"\n\n i18n-timeTabLabel=\"kendo.datetimepicker.timeTabLabel|The label for the Time tab in the datetimepicker popup header\"\n timeTabLabel=\"Time tab\"\n\n i18n-toggle=\"kendo.datetimepicker.toggle|The title of the toggle button in the datetimepicker component\"\n toggle=\"Toggle popup\"\n\n i18n-accept=\"kendo.datetimepicker.accept|The Accept button text in the datetimepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.datetimepicker.acceptLabel|The label for the Accept button in the datetimepicker component\"\n acceptLabel=\"Set\"\n\n i18n-cancel=\"kendo.datetimepicker.cancel|The Cancel button text in the datetimepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.datetimepicker.cancelLabel|The label for the Cancel button in the datetimepicker component\"\n cancelLabel=\"Cancel\"\n\n i18n-now=\"kendo.datetimepicker.now|The Now button text in the timepicker component\"\n now=\"NOW\"\n\n i18n-nowLabel=\"kendo.datetimepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-today=\"kendo.datetimepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.datetimepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datetimepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n\n <kendo-dateinput\n [value]=\"value\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [steps]=\"steps\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"isOpen\"\n (valueChange)=\"handleInputValueChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n [fillMode]=\"fillMode\"\n [rounded]=\"rounded\"\n [size]=\"size\"\n >\n </kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [tabindex]=\"-1\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n click: handleIconClick\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon\"\n [ngClass]=\"{\n 'k-i-calendar': activeTab === 'date',\n 'k-i-clock': activeTab === 'time'\n }\"\n ></span>\n </button>\n\n <ng-container #container></ng-container>\n\n <ng-template #popupTemplate>\n <div\n class=\"k-datetime-wrap k-{{activeTab}}-tab\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-datetime-buttongroup\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-button-group k-button-group-stretched\">\n <button\n type=\"button\"\n class=\"k-button k-group-start k-date-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'date'\"\n [attr.title]=\"localization.get('dateTabLabel')\"\n [attr.aria-label]=\"localization.get('dateTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'date'),\n keydown: handleBackTabOut\n }\"\n [scope]=\"this\"\n >\n {{localization.get('dateTab')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-group-end k-time-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'time'\"\n [attr.title]=\"localization.get('timeTabLabel')\"\n [attr.aria-label]=\"localization.get('timeTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'time')\n }\"\n >\n {{localization.get('timeTab')}}\n </button>\n </div>\n </div>\n <div\n #dateTimeSelector\n class=\"k-datetime-selector\"\n [style.transition]=\"tabSwitchTransition\"\n [kendoEventsOutsideAngular]=\"{\n transitionend: handleTabChangeTransitionEnd.bind(this, dateTimeSelector)\n }\"\n >\n <div class=\"k-datetime-calendar-wrap\">\n <kendo-calendar\n [(value)]=\"calendarValue\"\n [type]=\"calendarType\"\n [min]=\"calendarMin\"\n [max]=\"calendarMax\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [navigation]=\"false\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [disabled]=\"disableCalendar\"\n [disabledDates]=\"disabledDates\"\n (valueChange)=\"handleCalendarValueChange()\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n </div>\n <div class=\"k-datetime-time-wrap\">\n <kendo-timeselector\n [value]=\"value\"\n [format]=\"timeSelectorFormat\"\n [min]=\"timeSelectorMin\"\n [max]=\"timeSelectorMax\"\n [setButton]=\"false\"\n [cancelButton]=\"false\"\n [steps]=\"steps\"\n [disabled]=\"disableTimeSelector\"\n >\n <kendo-timeselector-messages\n [now]=\"localization.get('now')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </div>\n </div>\n <div\n class=\"k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleTabOut,\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <button\n *ngIf=\"cancelButton\"\n type=\"button\"\n class=\"k-button k-time-cancel\"\n [ngClass]=\"popupButtonsClasses()\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleCancel\n }\"\n [scope]=\"this\"\n >\n {{localization.get('cancel')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-time-accept\"\n [ngClass]=\"popupButtonsClasses('primary')\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [disabled]=\"!calendarValue\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept\n }\"\n [scope]=\"this\"\n >\n {{localization.get('accept')}}\n </button>\n </div>\n </div>\n </ng-template>\n "
1296
- }),
1297
- tslib_1.__param(6, Inject(TOUCH_ENABLED)),
1298
- tslib_1.__metadata("design:paramtypes", [PopupService,
1299
- IntlService,
1300
- ChangeDetectorRef,
1301
- PickerService,
1302
- NgZone,
1303
- ElementRef, Boolean, LocalizationService,
1304
- DisabledDatesService,
1305
- Renderer2])
1306
- ], DateTimePickerComponent);
1307
- return DateTimePickerComponent;
1308
- }());
1309
- export { DateTimePickerComponent };