@syncfusion/ej2-calendars 26.2.12 → 27.1.50

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 (348) hide show
  1. package/README.md +24 -24
  2. package/dist/ej2-calendars.min.js +2 -2
  3. package/dist/ej2-calendars.umd.min.js +2 -2
  4. package/dist/ej2-calendars.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-calendars.es2015.js +224 -73
  6. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  7. package/dist/es6/ej2-calendars.es5.js +224 -73
  8. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  9. package/dist/global/ej2-calendars.min.js +2 -2
  10. package/dist/global/ej2-calendars.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/calendar/calendar.js +31 -19
  14. package/src/datepicker/datepicker.d.ts +2 -0
  15. package/src/datepicker/datepicker.js +38 -15
  16. package/src/daterangepicker/daterangepicker.d.ts +1 -0
  17. package/src/daterangepicker/daterangepicker.js +27 -13
  18. package/src/datetimepicker/datetimepicker-model.d.ts +14 -0
  19. package/src/datetimepicker/datetimepicker.d.ts +13 -0
  20. package/src/datetimepicker/datetimepicker.js +108 -20
  21. package/src/timepicker/timepicker.d.ts +1 -0
  22. package/src/timepicker/timepicker.js +20 -6
  23. package/styles/bootstrap-dark-lite.css +2245 -0
  24. package/styles/bootstrap-dark-lite.scss +19 -0
  25. package/styles/bootstrap-dark.css +2261 -1747
  26. package/styles/bootstrap-dark.scss +6 -2
  27. package/styles/bootstrap-lite.css +2252 -0
  28. package/styles/bootstrap-lite.scss +19 -0
  29. package/styles/bootstrap.css +2261 -1741
  30. package/styles/bootstrap.scss +6 -2
  31. package/styles/bootstrap4-lite.css +2273 -0
  32. package/styles/bootstrap4-lite.scss +19 -0
  33. package/styles/bootstrap4.css +2278 -1758
  34. package/styles/bootstrap4.scss +6 -2
  35. package/styles/bootstrap5-dark-lite.css +2382 -0
  36. package/styles/bootstrap5-dark-lite.scss +19 -0
  37. package/styles/bootstrap5-dark.css +2350 -1827
  38. package/styles/bootstrap5-dark.scss +6 -2
  39. package/styles/bootstrap5-lite.css +2382 -0
  40. package/styles/bootstrap5-lite.scss +19 -0
  41. package/styles/bootstrap5.3-lite.css +2363 -0
  42. package/styles/bootstrap5.3-lite.scss +19 -0
  43. package/styles/bootstrap5.3.css +3725 -0
  44. package/styles/bootstrap5.3.scss +24 -0
  45. package/styles/bootstrap5.css +2351 -1828
  46. package/styles/bootstrap5.scss +6 -2
  47. package/styles/calendar/_bigger.scss +1142 -0
  48. package/styles/calendar/_bootstrap5.3-definition.scss +7 -3
  49. package/styles/calendar/_fluent-definition.scss +4 -2
  50. package/styles/calendar/_fluent2-definition.scss +9 -5
  51. package/styles/calendar/_layout.scss +7 -251
  52. package/styles/calendar/_theme.scss +32 -8
  53. package/styles/calendar/bootstrap-dark.css +681 -369
  54. package/styles/calendar/bootstrap-dark.scss +1 -0
  55. package/styles/calendar/bootstrap.css +681 -369
  56. package/styles/calendar/bootstrap.scss +1 -0
  57. package/styles/calendar/bootstrap4.css +681 -369
  58. package/styles/calendar/bootstrap4.scss +1 -0
  59. package/styles/calendar/bootstrap5-dark.css +704 -390
  60. package/styles/calendar/bootstrap5-dark.scss +1 -0
  61. package/styles/calendar/bootstrap5.3.css +1238 -0
  62. package/styles/calendar/bootstrap5.3.scss +6 -0
  63. package/styles/calendar/bootstrap5.css +704 -390
  64. package/styles/calendar/bootstrap5.scss +1 -0
  65. package/styles/calendar/fabric-dark.css +689 -371
  66. package/styles/calendar/fabric-dark.scss +1 -0
  67. package/styles/calendar/fabric.css +693 -373
  68. package/styles/calendar/fabric.scss +1 -0
  69. package/styles/calendar/fluent-dark.css +806 -420
  70. package/styles/calendar/fluent-dark.scss +1 -0
  71. package/styles/calendar/fluent.css +806 -420
  72. package/styles/calendar/fluent.scss +1 -0
  73. package/styles/calendar/fluent2.css +841 -423
  74. package/styles/calendar/fluent2.scss +1 -0
  75. package/styles/calendar/highcontrast-light.css +683 -369
  76. package/styles/calendar/highcontrast-light.scss +1 -0
  77. package/styles/calendar/highcontrast.css +693 -373
  78. package/styles/calendar/highcontrast.scss +1 -0
  79. package/styles/calendar/material-dark.css +693 -373
  80. package/styles/calendar/material-dark.scss +1 -0
  81. package/styles/calendar/material.css +693 -373
  82. package/styles/calendar/material.scss +1 -0
  83. package/styles/calendar/material3-dark.css +700 -376
  84. package/styles/calendar/material3-dark.scss +1 -0
  85. package/styles/calendar/material3.css +700 -376
  86. package/styles/calendar/material3.scss +1 -0
  87. package/styles/calendar/tailwind-dark.css +748 -421
  88. package/styles/calendar/tailwind-dark.scss +1 -0
  89. package/styles/calendar/tailwind.css +748 -421
  90. package/styles/calendar/tailwind.scss +1 -0
  91. package/styles/datepicker/_bigger.scss +82 -0
  92. package/styles/datepicker/_bootstrap5.3-definition.scss +7 -6
  93. package/styles/datepicker/_fluent2-definition.scss +2 -2
  94. package/styles/datepicker/_layout.scss +43 -26
  95. package/styles/datepicker/_theme.scss +2 -7
  96. package/styles/datepicker/bootstrap-dark.css +33 -43
  97. package/styles/datepicker/bootstrap-dark.scss +1 -0
  98. package/styles/datepicker/bootstrap.css +33 -43
  99. package/styles/datepicker/bootstrap.scss +1 -0
  100. package/styles/datepicker/bootstrap4.css +35 -45
  101. package/styles/datepicker/bootstrap4.scss +1 -0
  102. package/styles/datepicker/bootstrap5-dark.css +35 -45
  103. package/styles/datepicker/bootstrap5-dark.scss +1 -0
  104. package/styles/datepicker/bootstrap5.3.css +453 -0
  105. package/styles/datepicker/bootstrap5.3.scss +8 -0
  106. package/styles/datepicker/bootstrap5.css +35 -45
  107. package/styles/datepicker/bootstrap5.scss +1 -0
  108. package/styles/datepicker/fabric-dark.css +33 -43
  109. package/styles/datepicker/fabric-dark.scss +1 -0
  110. package/styles/datepicker/fabric.css +33 -43
  111. package/styles/datepicker/fabric.scss +1 -0
  112. package/styles/datepicker/fluent-dark.css +35 -45
  113. package/styles/datepicker/fluent-dark.scss +1 -0
  114. package/styles/datepicker/fluent.css +35 -45
  115. package/styles/datepicker/fluent.scss +1 -0
  116. package/styles/datepicker/fluent2.css +40 -52
  117. package/styles/datepicker/fluent2.scss +1 -0
  118. package/styles/datepicker/highcontrast-light.css +33 -43
  119. package/styles/datepicker/highcontrast-light.scss +1 -0
  120. package/styles/datepicker/highcontrast.css +33 -43
  121. package/styles/datepicker/highcontrast.scss +1 -0
  122. package/styles/datepicker/icons/_bds.scss +0 -24
  123. package/styles/datepicker/icons/_bootstrap-dark.scss +0 -24
  124. package/styles/datepicker/icons/_bootstrap.scss +0 -22
  125. package/styles/datepicker/icons/_bootstrap4.scss +0 -24
  126. package/styles/datepicker/icons/_bootstrap5.3.scss +0 -24
  127. package/styles/datepicker/icons/_bootstrap5.scss +0 -24
  128. package/styles/datepicker/icons/_fabric-dark.scss +0 -22
  129. package/styles/datepicker/icons/_fabric.scss +0 -22
  130. package/styles/datepicker/icons/_fluent.scss +0 -24
  131. package/styles/datepicker/icons/_fluent2.scss +0 -31
  132. package/styles/datepicker/icons/_fusionnew.scss +0 -24
  133. package/styles/datepicker/icons/_highcontrast-light.scss +0 -22
  134. package/styles/datepicker/icons/_highcontrast.scss +0 -22
  135. package/styles/datepicker/icons/_material-dark.scss +0 -40
  136. package/styles/datepicker/icons/_material.scss +0 -40
  137. package/styles/datepicker/icons/_material3.scss +0 -29
  138. package/styles/datepicker/icons/_tailwind.scss +0 -24
  139. package/styles/datepicker/material-dark.css +50 -60
  140. package/styles/datepicker/material-dark.scss +1 -0
  141. package/styles/datepicker/material.css +50 -60
  142. package/styles/datepicker/material.scss +1 -0
  143. package/styles/datepicker/material3-dark.css +41 -50
  144. package/styles/datepicker/material3-dark.scss +1 -0
  145. package/styles/datepicker/material3.css +41 -50
  146. package/styles/datepicker/material3.scss +1 -0
  147. package/styles/datepicker/tailwind-dark.css +40 -50
  148. package/styles/datepicker/tailwind-dark.scss +1 -0
  149. package/styles/datepicker/tailwind.css +40 -50
  150. package/styles/datepicker/tailwind.scss +1 -0
  151. package/styles/daterangepicker/_bigger.scss +971 -0
  152. package/styles/daterangepicker/_bootstrap5.3-definition.scss +5 -3
  153. package/styles/daterangepicker/_fluent-definition.scss +0 -9
  154. package/styles/daterangepicker/_fluent2-definition.scss +3 -7
  155. package/styles/daterangepicker/_layout.scss +20 -252
  156. package/styles/daterangepicker/_theme.scss +20 -68
  157. package/styles/daterangepicker/bootstrap-dark.css +750 -540
  158. package/styles/daterangepicker/bootstrap-dark.scss +1 -0
  159. package/styles/daterangepicker/bootstrap.css +779 -563
  160. package/styles/daterangepicker/bootstrap.scss +1 -0
  161. package/styles/daterangepicker/bootstrap4.css +752 -536
  162. package/styles/daterangepicker/bootstrap4.scss +1 -0
  163. package/styles/daterangepicker/bootstrap5-dark.css +786 -570
  164. package/styles/daterangepicker/bootstrap5-dark.scss +1 -0
  165. package/styles/daterangepicker/bootstrap5.3.css +1500 -0
  166. package/styles/daterangepicker/bootstrap5.3.scss +8 -0
  167. package/styles/daterangepicker/bootstrap5.css +786 -570
  168. package/styles/daterangepicker/bootstrap5.scss +1 -0
  169. package/styles/daterangepicker/fabric-dark.css +752 -536
  170. package/styles/daterangepicker/fabric-dark.scss +1 -0
  171. package/styles/daterangepicker/fabric.css +752 -536
  172. package/styles/daterangepicker/fabric.scss +1 -0
  173. package/styles/daterangepicker/fluent-dark.css +817 -592
  174. package/styles/daterangepicker/fluent-dark.scss +1 -0
  175. package/styles/daterangepicker/fluent.css +817 -592
  176. package/styles/daterangepicker/fluent.scss +1 -0
  177. package/styles/daterangepicker/fluent2.css +791 -571
  178. package/styles/daterangepicker/fluent2.scss +1 -0
  179. package/styles/daterangepicker/highcontrast-light.css +752 -536
  180. package/styles/daterangepicker/highcontrast-light.scss +1 -0
  181. package/styles/daterangepicker/highcontrast.css +752 -536
  182. package/styles/daterangepicker/highcontrast.scss +1 -0
  183. package/styles/daterangepicker/icons/_bds.scss +0 -18
  184. package/styles/daterangepicker/icons/_bootstrap-dark.scss +0 -24
  185. package/styles/daterangepicker/icons/_bootstrap.scss +0 -16
  186. package/styles/daterangepicker/icons/_bootstrap4.scss +0 -19
  187. package/styles/daterangepicker/icons/_bootstrap5.3.scss +0 -18
  188. package/styles/daterangepicker/icons/_bootstrap5.scss +0 -18
  189. package/styles/daterangepicker/icons/_fabric-dark.scss +0 -16
  190. package/styles/daterangepicker/icons/_fabric.scss +0 -16
  191. package/styles/daterangepicker/icons/_fluent.scss +0 -18
  192. package/styles/daterangepicker/icons/_fluent2.scss +0 -41
  193. package/styles/daterangepicker/icons/_fusionnew.scss +0 -18
  194. package/styles/daterangepicker/icons/_highcontrast-light.scss +0 -16
  195. package/styles/daterangepicker/icons/_highcontrast.scss +0 -16
  196. package/styles/daterangepicker/icons/_material-dark.scss +0 -34
  197. package/styles/daterangepicker/icons/_material.scss +0 -34
  198. package/styles/daterangepicker/icons/_material3.scss +0 -39
  199. package/styles/daterangepicker/icons/_tailwind.scss +0 -18
  200. package/styles/daterangepicker/material-dark.css +781 -565
  201. package/styles/daterangepicker/material-dark.scss +1 -0
  202. package/styles/daterangepicker/material.css +784 -568
  203. package/styles/daterangepicker/material.scss +1 -0
  204. package/styles/daterangepicker/material3-dark.css +802 -572
  205. package/styles/daterangepicker/material3-dark.scss +1 -0
  206. package/styles/daterangepicker/material3.css +802 -572
  207. package/styles/daterangepicker/material3.scss +1 -0
  208. package/styles/daterangepicker/tailwind-dark.css +791 -559
  209. package/styles/daterangepicker/tailwind-dark.scss +1 -0
  210. package/styles/daterangepicker/tailwind.css +791 -559
  211. package/styles/daterangepicker/tailwind.scss +1 -0
  212. package/styles/datetimepicker/_bigger.scss +105 -0
  213. package/styles/datetimepicker/_layout.scss +0 -76
  214. package/styles/datetimepicker/bootstrap-dark.css +42 -42
  215. package/styles/datetimepicker/bootstrap-dark.scss +1 -0
  216. package/styles/datetimepicker/bootstrap.css +42 -42
  217. package/styles/datetimepicker/bootstrap.scss +1 -0
  218. package/styles/datetimepicker/bootstrap4.css +42 -42
  219. package/styles/datetimepicker/bootstrap4.scss +1 -0
  220. package/styles/datetimepicker/bootstrap5-dark.css +42 -42
  221. package/styles/datetimepicker/bootstrap5-dark.scss +1 -0
  222. package/styles/datetimepicker/bootstrap5.3.css +227 -0
  223. package/styles/datetimepicker/bootstrap5.3.scss +9 -0
  224. package/styles/datetimepicker/bootstrap5.css +42 -42
  225. package/styles/datetimepicker/bootstrap5.scss +1 -0
  226. package/styles/datetimepicker/fabric-dark.css +42 -42
  227. package/styles/datetimepicker/fabric-dark.scss +1 -0
  228. package/styles/datetimepicker/fabric.css +42 -42
  229. package/styles/datetimepicker/fabric.scss +1 -0
  230. package/styles/datetimepicker/fluent-dark.css +42 -42
  231. package/styles/datetimepicker/fluent-dark.scss +1 -0
  232. package/styles/datetimepicker/fluent.css +42 -42
  233. package/styles/datetimepicker/fluent.scss +1 -0
  234. package/styles/datetimepicker/fluent2.css +42 -42
  235. package/styles/datetimepicker/fluent2.scss +1 -0
  236. package/styles/datetimepicker/highcontrast-light.css +42 -42
  237. package/styles/datetimepicker/highcontrast-light.scss +1 -0
  238. package/styles/datetimepicker/highcontrast.css +42 -42
  239. package/styles/datetimepicker/highcontrast.scss +1 -0
  240. package/styles/datetimepicker/icons/_material-dark.scss +0 -22
  241. package/styles/datetimepicker/icons/_material.scss +0 -22
  242. package/styles/datetimepicker/material-dark.css +66 -66
  243. package/styles/datetimepicker/material-dark.scss +1 -0
  244. package/styles/datetimepicker/material.css +66 -66
  245. package/styles/datetimepicker/material.scss +1 -0
  246. package/styles/datetimepicker/material3-dark.css +53 -53
  247. package/styles/datetimepicker/material3-dark.scss +1 -0
  248. package/styles/datetimepicker/material3.css +53 -53
  249. package/styles/datetimepicker/material3.scss +1 -0
  250. package/styles/datetimepicker/tailwind-dark.css +42 -42
  251. package/styles/datetimepicker/tailwind-dark.scss +1 -0
  252. package/styles/datetimepicker/tailwind.css +42 -42
  253. package/styles/datetimepicker/tailwind.scss +1 -0
  254. package/styles/fabric-dark-lite.css +2251 -0
  255. package/styles/fabric-dark-lite.scss +19 -0
  256. package/styles/fabric-dark.css +2268 -1742
  257. package/styles/fabric-dark.scss +6 -2
  258. package/styles/fabric-lite.css +2255 -0
  259. package/styles/fabric-lite.scss +19 -0
  260. package/styles/fabric.css +2265 -1737
  261. package/styles/fabric.scss +6 -2
  262. package/styles/fluent-dark-lite.css +2509 -0
  263. package/styles/fluent-dark-lite.scss +19 -0
  264. package/styles/fluent-dark.css +2456 -1853
  265. package/styles/fluent-dark.scss +6 -2
  266. package/styles/fluent-lite.css +2509 -0
  267. package/styles/fluent-lite.scss +19 -0
  268. package/styles/fluent.css +2456 -1853
  269. package/styles/fluent.scss +6 -2
  270. package/styles/fluent2-lite.css +2606 -0
  271. package/styles/fluent2-lite.scss +19 -0
  272. package/styles/fluent2.css +2410 -1781
  273. package/styles/fluent2.scss +6 -2
  274. package/styles/highcontrast-light-lite.css +2259 -0
  275. package/styles/highcontrast-light-lite.scss +19 -0
  276. package/styles/highcontrast-light.css +2264 -1742
  277. package/styles/highcontrast-light.scss +6 -2
  278. package/styles/highcontrast-lite.css +2268 -0
  279. package/styles/highcontrast-lite.scss +19 -0
  280. package/styles/highcontrast.css +2273 -1745
  281. package/styles/highcontrast.scss +6 -2
  282. package/styles/material-dark-lite.css +2345 -0
  283. package/styles/material-dark-lite.scss +19 -0
  284. package/styles/material-dark.css +2371 -1843
  285. package/styles/material-dark.scss +6 -2
  286. package/styles/material-lite.css +2375 -0
  287. package/styles/material-lite.scss +19 -0
  288. package/styles/material.css +2363 -1835
  289. package/styles/material.scss +6 -2
  290. package/styles/material3-dark-lite.css +2400 -0
  291. package/styles/material3-dark-lite.scss +19 -0
  292. package/styles/material3-dark.css +2414 -1867
  293. package/styles/material3-dark.scss +6 -2
  294. package/styles/material3-lite.css +2402 -0
  295. package/styles/material3-lite.scss +19 -0
  296. package/styles/material3.css +2414 -1867
  297. package/styles/material3.scss +6 -2
  298. package/styles/tailwind-dark-lite.css +2327 -0
  299. package/styles/tailwind-dark-lite.scss +19 -0
  300. package/styles/tailwind-dark.css +2362 -1811
  301. package/styles/tailwind-dark.scss +6 -2
  302. package/styles/tailwind-lite.css +2327 -0
  303. package/styles/tailwind-lite.scss +19 -0
  304. package/styles/tailwind.css +2363 -1812
  305. package/styles/tailwind.scss +6 -2
  306. package/styles/timepicker/_bigger.scss +92 -0
  307. package/styles/timepicker/_layout.scss +0 -62
  308. package/styles/timepicker/_theme.scss +2 -4
  309. package/styles/timepicker/bootstrap-dark.css +44 -41
  310. package/styles/timepicker/bootstrap-dark.scss +1 -0
  311. package/styles/timepicker/bootstrap.css +44 -41
  312. package/styles/timepicker/bootstrap.scss +1 -0
  313. package/styles/timepicker/bootstrap4.css +44 -41
  314. package/styles/timepicker/bootstrap4.scss +1 -0
  315. package/styles/timepicker/bootstrap5-dark.css +44 -41
  316. package/styles/timepicker/bootstrap5-dark.scss +1 -0
  317. package/styles/timepicker/bootstrap5.3.css +327 -0
  318. package/styles/timepicker/bootstrap5.3.scss +7 -0
  319. package/styles/timepicker/bootstrap5.css +44 -41
  320. package/styles/timepicker/bootstrap5.scss +1 -0
  321. package/styles/timepicker/fabric-dark.css +44 -41
  322. package/styles/timepicker/fabric-dark.scss +1 -0
  323. package/styles/timepicker/fabric.css +44 -41
  324. package/styles/timepicker/fabric.scss +1 -0
  325. package/styles/timepicker/fluent-dark.css +44 -41
  326. package/styles/timepicker/fluent-dark.scss +1 -0
  327. package/styles/timepicker/fluent.css +44 -41
  328. package/styles/timepicker/fluent.scss +1 -0
  329. package/styles/timepicker/fluent2.css +44 -41
  330. package/styles/timepicker/fluent2.scss +1 -0
  331. package/styles/timepicker/highcontrast-light.css +44 -41
  332. package/styles/timepicker/highcontrast-light.scss +1 -0
  333. package/styles/timepicker/highcontrast.css +44 -41
  334. package/styles/timepicker/highcontrast.scss +1 -0
  335. package/styles/timepicker/icons/_material-dark.scss +0 -15
  336. package/styles/timepicker/icons/_material.scss +0 -15
  337. package/styles/timepicker/material-dark.css +61 -58
  338. package/styles/timepicker/material-dark.scss +1 -0
  339. package/styles/timepicker/material.css +61 -58
  340. package/styles/timepicker/material.scss +1 -0
  341. package/styles/timepicker/material3-dark.css +52 -49
  342. package/styles/timepicker/material3-dark.scss +1 -0
  343. package/styles/timepicker/material3.css +52 -49
  344. package/styles/timepicker/material3.scss +1 -0
  345. package/styles/timepicker/tailwind-dark.css +44 -41
  346. package/styles/timepicker/tailwind-dark.scss +1 -0
  347. package/styles/timepicker/tailwind.css +44 -41
  348. package/styles/timepicker/tailwind.scss +1 -0
@@ -310,8 +310,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
310
310
  CalendarBase.prototype.getCultureValues = function () {
311
311
  var culShortNames = [];
312
312
  var cldrObj;
313
- var dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();
314
- if (this.locale === 'en' || this.locale === 'en-US') {
313
+ var dayFormat = !isNullOrUndefined(this.dayHeaderFormat) ? 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase() : null;
314
+ if ((this.locale === 'en' || this.locale === 'en-US') && !isNullOrUndefined(dayFormat)) {
315
315
  cldrObj = (getValue(dayFormat, getDefaultDateObject()));
316
316
  }
317
317
  else {
@@ -499,22 +499,19 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
499
499
  this.effect = '';
500
500
  switch (e.action) {
501
501
  case 'moveLeft':
502
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
503
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
502
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
504
503
  this.keyboardNavigate(-1, view, e, this.max, this.min);
505
504
  e.preventDefault();
506
505
  }
507
506
  break;
508
507
  case 'moveRight':
509
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
510
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
508
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
511
509
  this.keyboardNavigate(1, view, e, this.max, this.min);
512
510
  e.preventDefault();
513
511
  }
514
512
  break;
515
513
  case 'moveUp':
516
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
517
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
514
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
518
515
  if (view === 0) {
519
516
  this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
520
517
  }
@@ -525,8 +522,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
525
522
  }
526
523
  break;
527
524
  case 'moveDown':
528
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
529
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
525
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
530
526
  if (view === 0) {
531
527
  this.keyboardNavigate(7, view, e, this.max, this.min);
532
528
  }
@@ -549,7 +545,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
549
545
  else if (e.target === this.todayElement && !e.target.className.includes(DISABLED)) {
550
546
  this.todayButtonClick(e, value);
551
547
  if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
552
- this.element.focus();
548
+ if (this.isAngular) {
549
+ this.inputElement.focus();
550
+ }
551
+ else {
552
+ this.element.focus();
553
+ }
553
554
  }
554
555
  }
555
556
  else {
@@ -560,7 +561,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
560
561
  var d = new Date(parseInt('' + (element).id, 0));
561
562
  this.selectDate(e, d, (element));
562
563
  if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
563
- this.element.focus();
564
+ if (this.isAngular) {
565
+ this.inputElement.focus();
566
+ }
567
+ else {
568
+ this.element.focus();
569
+ }
564
570
  }
565
571
  }
566
572
  else {
@@ -652,7 +658,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
652
658
  case 'shiftTab':
653
659
  if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.headerTitleElement) {
654
660
  e.preventDefault();
655
- this.element.focus();
661
+ if (this.isAngular) {
662
+ this.inputElement.focus();
663
+ }
664
+ else {
665
+ this.element.focus();
666
+ }
656
667
  this.hide();
657
668
  }
658
669
  break;
@@ -747,13 +758,13 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
747
758
  tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);
748
759
  }
749
760
  else {
750
- tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
761
+ tdEles = !isNullOrUndefined(this.islamicModule) ? this.islamicModule.islamicRenderDays(this.currentDate, value) : null;
751
762
  }
752
763
  this.createContentHeader();
753
764
  if (this.calendarMode === 'Gregorian') {
754
765
  this.renderTemplate(tdEles, numCells, MONTH, e, value);
755
766
  }
756
- else {
767
+ else if (!isNullOrUndefined(this.islamicModule)) {
757
768
  this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
758
769
  }
759
770
  };
@@ -1041,7 +1052,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1041
1052
  return this.createElement('td', attrs);
1042
1053
  };
1043
1054
  CalendarBase.prototype.firstDay = function (date) {
1044
- var collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '') :
1055
+ var collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td:not(.' + OTHERMONTH + '):not(.' + WEEKNUMBER + ')') :
1045
1056
  this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '');
1046
1057
  if (collection.length) {
1047
1058
  for (var i = 0; i < collection.length; i++) {
@@ -1072,7 +1083,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1072
1083
  };
1073
1084
  CalendarBase.prototype.findLastDay = function (date) {
1074
1085
  var collection = this.currentView() === 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '') :
1075
- this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '');
1086
+ this.tableBodyElement.querySelectorAll('td:not(.' + OTHERMONTH + '):not(.' + WEEKNUMBER + ')');
1076
1087
  if (collection.length) {
1077
1088
  for (var i = collection.length - 1; i >= 0; i--) {
1078
1089
  if (!collection[i].classList.contains(DISABLED)) {
@@ -1704,8 +1715,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1704
1715
  };
1705
1716
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1706
1717
  CalendarBase.prototype.getCultureObjects = function (ld, c) {
1707
- var gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();
1708
- var islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();
1718
+ var gregorianFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
1719
+ var islamicFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
1709
1720
  var mainVal = 'main.';
1710
1721
  if (this.calendarMode === 'Gregorian') {
1711
1722
  return getValue(mainVal + '' + this.locale + gregorianFormat, ld);
@@ -2666,6 +2677,7 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
2666
2677
  if (!isNullOrUndefined(this.value)) {
2667
2678
  this.setProperties({ value: this.value }, true);
2668
2679
  }
2680
+ // eslint-disable-next-line
2669
2681
  if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
2670
2682
  !isNullOrUndefined(this.previousDate) || this.previousDate === null
2671
2683
  && !isNaN(+this.value))) {
@@ -3416,7 +3428,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3416
3428
  var ariaAttrs = {
3417
3429
  'aria-atomic': 'true', 'aria-expanded': 'false',
3418
3430
  'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
3419
- 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false', 'aria-label': this.getModuleName()
3431
+ 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
3420
3432
  };
3421
3433
  if (this.getModuleName() === 'datepicker') {
3422
3434
  var l10nLocale = { placeholder: this.placeholder };
@@ -3454,6 +3466,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3454
3466
  this.inputElement.setAttribute('name', '' + this.element.id);
3455
3467
  }
3456
3468
  attributes(this.inputElement, ariaAttrs);
3469
+ if (!this.inputElement.hasAttribute('aria-label')) {
3470
+ this.inputElement.setAttribute('aria-label', this.getModuleName());
3471
+ }
3457
3472
  if (!this.enabled) {
3458
3473
  this.inputElement.setAttribute('aria-disabled', 'true');
3459
3474
  this.inputElement.tabIndex = -1;
@@ -3569,9 +3584,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3569
3584
  formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
3570
3585
  }
3571
3586
  }
3572
- returnDate = this.checkDateValue(this.globalize.parseDate(val, formatOptions));
3587
+ returnDate = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(val), formatOptions));
3573
3588
  if (isNullOrUndefined(returnDate) && (this.getModuleName() === 'datetimepicker')) {
3574
- returnDate = this.checkDateValue(this.globalize.parseDate(val, formatDateTime));
3589
+ returnDate = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(val), formatDateTime));
3575
3590
  }
3576
3591
  return returnDate;
3577
3592
  };
@@ -4164,9 +4179,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4164
4179
  this.inputElement.value = this.inputElement.value.trim();
4165
4180
  }
4166
4181
  if ((this.getModuleName() === 'datetimepicker')) {
4167
- if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
4168
- var modifiedValue = this.inputElement.value.replace(/(am|pm|Am|aM|pM|Pm)/g, function (match) { return match.toLocaleUpperCase(); });
4169
- date = this.globalize.parseDate(modifiedValue, dateOptions);
4182
+ if (this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions))) {
4183
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4170
4184
  }
4171
4185
  else {
4172
4186
  if (this.calendarMode === 'Gregorian') {
@@ -4175,11 +4189,11 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4175
4189
  else {
4176
4190
  formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4177
4191
  }
4178
- date = this.globalize.parseDate(this.inputElement.value, formatOptions);
4192
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), formatOptions);
4179
4193
  }
4180
4194
  }
4181
4195
  else {
4182
- date = this.globalize.parseDate(this.inputElement.value, dateOptions);
4196
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4183
4197
  date = (!isNullOrUndefined(date) && isNaN(+date)) ? null : date;
4184
4198
  if (!isNullOrUndefined(this.formatString) && this.inputElement.value !== '' && this.strictMode) {
4185
4199
  if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))
@@ -4289,6 +4303,20 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4289
4303
  this.popupObj.element.className += ' ' + this.cssClass;
4290
4304
  this.setAriaAttributes();
4291
4305
  };
4306
+ DatePicker.prototype.getAmPmValue = function (date) {
4307
+ try {
4308
+ if (typeof date === 'string' && date.trim() !== '') {
4309
+ // Replace am/pm variants with uppercase AM/PM
4310
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, function (match) { return match.toLocaleUpperCase(); });
4311
+ }
4312
+ // If date is null, undefined, or an empty string, return a default value or empty string
4313
+ return '';
4314
+ }
4315
+ catch (error) {
4316
+ console.error('Error occurred while processing date:', error);
4317
+ return ''; // Return a default value in case of an error
4318
+ }
4319
+ };
4292
4320
  DatePicker.prototype.CalendarSwipeHandler = function (e) {
4293
4321
  var direction = 0;
4294
4322
  if (this.iconRight) {
@@ -4717,7 +4745,6 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4717
4745
  if (this.showClearButton) {
4718
4746
  this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
4719
4747
  }
4720
- this.hide(null);
4721
4748
  _super.prototype.destroy.call(this);
4722
4749
  Input.destroy({
4723
4750
  element: this.inputElement,
@@ -4733,8 +4760,11 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4733
4760
  var ariaAttrs = {
4734
4761
  'aria-atomic': 'true', 'aria-disabled': 'true',
4735
4762
  'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
4736
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-label': this.getModuleName()
4763
+ 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
4737
4764
  };
4765
+ if (this.inputElement.hasAttribute('aria-label')) {
4766
+ this.inputElement.removeAttribute('aria-label');
4767
+ }
4738
4768
  if (this.inputElement) {
4739
4769
  Input.removeAttributes(ariaAttrs, this.inputElement);
4740
4770
  if (!isNullOrUndefined(this.inputElementCopy.getAttribute('tabindex'))) {
@@ -4969,19 +4999,19 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4969
4999
  case 'value':
4970
5000
  if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['value'] === undefined)) || dynamic)) {
4971
5001
  var value = this.inputElement.getAttribute(prop);
4972
- this.setProperties(setValue(prop, this.globalize.parseDate(value, options), {}), !dynamic);
5002
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(value), options), {}), !dynamic);
4973
5003
  }
4974
5004
  break;
4975
5005
  case 'min':
4976
5006
  if ((+this.min === +new Date(1900, 0, 1)) || dynamic) {
4977
5007
  var min = this.inputElement.getAttribute(prop);
4978
- this.setProperties(setValue(prop, this.globalize.parseDate(min, options), {}), !dynamic);
5008
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(min), options), {}), !dynamic);
4979
5009
  }
4980
5010
  break;
4981
5011
  case 'max':
4982
5012
  if ((+this.max === +new Date(2099, 11, 31)) || dynamic) {
4983
5013
  var max = this.inputElement.getAttribute(prop);
4984
- this.setProperties(setValue(prop, this.globalize.parseDate(max, options), {}), !dynamic);
5014
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(max), options), {}), !dynamic);
4985
5015
  }
4986
5016
  break;
4987
5017
  case 'type':
@@ -5086,9 +5116,11 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5086
5116
  this.calendarElement.querySelectorAll(dateIdString)[0] &&
5087
5117
  this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
5088
5118
  if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
5089
- !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
5119
+ !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >=
5120
+ new Date(this.min).setMilliseconds(0)
5090
5121
  && new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
5091
- || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
5122
+ || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue &&
5123
+ isNullOrUndefined(this.value) || isDisabledDate) || !this.isValidTime(this.value)) {
5092
5124
  addClass([this.inputWrapper.container], ERROR);
5093
5125
  attributes(this.inputElement, { 'aria-invalid': 'true' });
5094
5126
  }
@@ -5097,6 +5129,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5097
5129
  attributes(this.inputElement, { 'aria-invalid': 'false' });
5098
5130
  }
5099
5131
  };
5132
+ DatePicker.prototype.isValidTime = function (value) {
5133
+ return true;
5134
+ };
5100
5135
  /**
5101
5136
  * Called internally if any of the property value changed.
5102
5137
  *
@@ -5809,7 +5844,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5809
5844
  DateRangePicker.prototype.processPresets = function () {
5810
5845
  this.presetsItem = [];
5811
5846
  var i = 0;
5812
- if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
5847
+ if (!isNullOrUndefined(this.presets[0]) && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
5813
5848
  for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {
5814
5849
  var range = _a[_i];
5815
5850
  var id = range.label.replace(/\s+/g, '') + '_' + (++i);
@@ -5879,10 +5914,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5879
5914
  if (this.firstHiddenChild && this.secondHiddenChild) {
5880
5915
  var format = { format: this.formatString, type: 'datetime', skeleton: 'yMd' };
5881
5916
  if (typeof this.startDate === 'string') {
5882
- this.startDate = this.globalize.parseDate(this.startDate, format);
5917
+ this.startDate = this.globalize.parseDate(this.getAmPmValue(this.startDate), format);
5883
5918
  }
5884
5919
  if (typeof this.endDate === 'string') {
5885
- this.endDate = this.globalize.parseDate(this.endDate, format);
5920
+ this.endDate = this.globalize.parseDate(this.getAmPmValue(this.endDate), format);
5886
5921
  }
5887
5922
  this.firstHiddenChild.value = (this.startDate && this.globalize.formatDate(this.startDate, format))
5888
5923
  || (this.inputElement.value);
@@ -6058,7 +6093,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6058
6093
  break;
6059
6094
  case 'min':
6060
6095
  if ((isNullOrUndefined(this.min) || +this.min === +new Date(1900, 0, 1)) || isDynamic) {
6061
- var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6096
+ var dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6062
6097
  this.setProperties(setValue(prop, dateValue, {}), !isDynamic);
6063
6098
  }
6064
6099
  break;
@@ -6067,20 +6102,20 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6067
6102
  break;
6068
6103
  case 'max':
6069
6104
  if ((isNullOrUndefined(this.max) || +this.max === +new Date(2099, 11, 31)) || isDynamic) {
6070
- var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6105
+ var dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6071
6106
  this.setProperties(setValue(prop, dateValue, {}), !isDynamic);
6072
6107
  }
6073
6108
  break;
6074
6109
  case 'startDate':
6075
6110
  if (isNullOrUndefined(this.startDate)) {
6076
- var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6111
+ var dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6077
6112
  this.startValue = dateValue;
6078
6113
  this.setValue();
6079
6114
  }
6080
6115
  break;
6081
6116
  case 'endDate':
6082
6117
  if (isNullOrUndefined(this.endDate)) {
6083
- var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6118
+ var dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6084
6119
  this.endValue = dateValue;
6085
6120
  this.setValue();
6086
6121
  }
@@ -6315,8 +6350,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6315
6350
  if (range.length > 1) {
6316
6351
  this.invalidValueString = null;
6317
6352
  var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
6318
- var start = this.globalize.parseDate(range[0], dateOptions);
6319
- var end = this.globalize.parseDate(range[1], dateOptions);
6353
+ var start = this.globalize.parseDate(this.getAmPmValue(range[0]), dateOptions);
6354
+ var end = this.globalize.parseDate(this.getAmPmValue(range[1]), dateOptions);
6320
6355
  var startDate = this.getStartEndDate(start, false, range, dateOptions);
6321
6356
  var endDate = this.getStartEndDate(end, true, range, dateOptions);
6322
6357
  if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
@@ -6392,7 +6427,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6392
6427
  };
6393
6428
  DateRangePicker.prototype.getStartEndDate = function (date, isEnd, range, dateOptions) {
6394
6429
  if (this.depth === 'Month') {
6395
- return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
6430
+ return this.globalize.parseDate(this.getAmPmValue(range[isEnd ? 1 : 0]).trim(), dateOptions);
6396
6431
  }
6397
6432
  else if (this.depth === 'Year' && !isNullOrUndefined(date)) {
6398
6433
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
@@ -6409,7 +6444,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6409
6444
  this.currentDate = null;
6410
6445
  };
6411
6446
  DateRangePicker.prototype.errorClass = function () {
6412
- var inputStr = this.inputElement.value.trim();
6447
+ var inputStr = !isNullOrUndefined(this.inputElement.value) ? this.inputElement.value.trim() : null;
6413
6448
  if (((isNullOrUndefined(this.endValue) && isNullOrUndefined(this.startValue) && inputStr !== '') ||
6414
6449
  ((!isNullOrUndefined(this.startValue) && +this.startValue < +this.min)
6415
6450
  || ((!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) && +this.startValue > +this.endValue)
@@ -9603,6 +9638,20 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9603
9638
  this.updateHeader();
9604
9639
  }
9605
9640
  };
9641
+ DateRangePicker.prototype.getAmPmValue = function (date) {
9642
+ try {
9643
+ if (typeof date === 'string' && date.trim() !== '') {
9644
+ // Replace am/pm variants with uppercase AM/PM
9645
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, function (match) { return match.toLocaleUpperCase(); });
9646
+ }
9647
+ // If date is null, undefined, or an empty string, return a default value or empty string
9648
+ return '';
9649
+ }
9650
+ catch (error) {
9651
+ console.error('Error occurred while processing date:', error);
9652
+ return ''; // Return a default value in case of an error
9653
+ }
9654
+ };
9606
9655
  DateRangePicker.prototype.getStartEndValue = function (date, isEnd) {
9607
9656
  if (this.depth === 'Month') {
9608
9657
  return this.checkDateValue(new Date(this.checkValue(date)));
@@ -9703,7 +9752,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9703
9752
  break;
9704
9753
  case 'startDate':
9705
9754
  if (typeof newProp.startDate === 'string') {
9706
- newProp.startDate = this.globalize.parseDate(newProp.startDate, format);
9755
+ newProp.startDate = this.globalize.parseDate(this.getAmPmValue(newProp.startDate), format);
9707
9756
  }
9708
9757
  if (+this.initStartDate !== +newProp.startDate) {
9709
9758
  this.startValue = this.getStartEndValue(newProp.startDate, false);
@@ -9713,7 +9762,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9713
9762
  break;
9714
9763
  case 'endDate':
9715
9764
  if (typeof newProp.endDate === 'string') {
9716
- newProp.endDate = this.globalize.parseDate(newProp.endDate, format);
9765
+ newProp.endDate = this.globalize.parseDate(this.getAmPmValue(newProp.endDate), format);
9717
9766
  }
9718
9767
  if (+this.initEndDate !== +newProp.endDate) {
9719
9768
  this.endValue = this.getStartEndValue(newProp.endDate, true);
@@ -10374,18 +10423,18 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10374
10423
  if (!(/^[a-zA-Z0-9- ]*$/).test(value)) {
10375
10424
  valueExpression = this.setCurrentDate(this.getDateObject(value));
10376
10425
  if (isNullOrUndefined(valueExpression)) {
10377
- valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
10426
+ valueExpression = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(valueString), {
10378
10427
  format: this.getCldrDateTimeFormat(), type: 'datetime'
10379
10428
  }));
10380
10429
  if (isNullOrUndefined(valueExpression)) {
10381
- valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
10430
+ valueExpression = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(valueString), {
10382
10431
  format: this.formatString, type: 'dateTime', skeleton: 'yMd'
10383
10432
  }));
10384
10433
  }
10385
10434
  }
10386
10435
  }
10387
10436
  }
10388
- valueExp = this.globalize.parseDate(valueString, {
10437
+ valueExp = this.globalize.parseDate(this.getAmPmValue(valueString), {
10389
10438
  format: this.getCldrDateTimeFormat(), type: 'datetime'
10390
10439
  });
10391
10440
  valueExpression = (!isNullOrUndefined(valueExp) && valueExp instanceof Date && !isNaN(+valueExp)) ? valueExp : null;
@@ -10424,6 +10473,20 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10424
10473
  }
10425
10474
  return modules;
10426
10475
  };
10476
+ TimePicker.prototype.getAmPmValue = function (date) {
10477
+ try {
10478
+ if (typeof date === 'string' && date.trim() !== '') {
10479
+ // Replace am/pm variants with uppercase AM/PM
10480
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, function (match) { return match.toLocaleUpperCase(); });
10481
+ }
10482
+ // If date is null, undefined, or an empty string, return a default value or empty string
10483
+ return '';
10484
+ }
10485
+ catch (error) {
10486
+ console.error('Error occurred while processing date:', error);
10487
+ return ''; // Return a default value in case of an error
10488
+ }
10489
+ };
10427
10490
  TimePicker.prototype.cldrFormat = function (type) {
10428
10491
  var cldrDateTimeString;
10429
10492
  if (this.locale === 'en' || this.locale === 'en-US') {
@@ -11199,7 +11262,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11199
11262
  return dateVal;
11200
11263
  };
11201
11264
  TimePicker.prototype.valueIsDisable = function (value) {
11202
- if (this.disableItemCollection.length > 0) {
11265
+ if (!isNullOrUndefined(this.disableItemCollection) && this.disableItemCollection.length > 0) {
11203
11266
  if (this.disableItemCollection.length === this.timeCollections.length) {
11204
11267
  return false;
11205
11268
  }
@@ -11929,10 +11992,10 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11929
11992
  };
11930
11993
  TimePicker.prototype.timeParse = function (today, val) {
11931
11994
  var value;
11932
- value = this.globalize.parseDate(today + ' ' + val, {
11995
+ value = this.globalize.parseDate(this.getAmPmValue(today + ' ' + val), {
11933
11996
  format: this.cldrDateFormat() + ' ' + this.cldrTimeFormat(), type: 'datetime'
11934
11997
  });
11935
- value = isNullOrUndefined(value) ? this.globalize.parseDate(today + ' ' + val, {
11998
+ value = isNullOrUndefined(value) ? this.globalize.parseDate(this.getAmPmValue(today + ' ' + val), {
11936
11999
  format: this.cldrDateFormat() + ' ' + this.dateToNumeric(), type: 'datetime'
11937
12000
  }) : value;
11938
12001
  value = isNullOrUndefined(value) ? value : new Date(value.setMilliseconds(0));
@@ -12705,7 +12768,6 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12705
12768
  if (this.showClearButton) {
12706
12769
  this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
12707
12770
  }
12708
- this.hide(null);
12709
12771
  if (this.popupObject && this.popupObject.element.classList.contains(POPUP$3)) {
12710
12772
  this.popupObject.destroy();
12711
12773
  detach(this.dateTimeWrapper);
@@ -12778,6 +12840,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12778
12840
  if (typeof (this.max) === 'string') {
12779
12841
  this.max = this.checkDateValue(new Date(this.max));
12780
12842
  }
12843
+ if (typeof (this.minTime) === 'string') {
12844
+ this.minTime = this.checkDateValue(new Date(this.minTime));
12845
+ }
12846
+ if (typeof (this.maxTime) === 'string') {
12847
+ this.maxTime = this.checkDateValue(new Date(this.maxTime));
12848
+ }
12781
12849
  if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
12782
12850
  this.enabled = false;
12783
12851
  }
@@ -12849,7 +12917,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12849
12917
  DateTimePicker.prototype.checkValidState = function (value) {
12850
12918
  this.isValidState = true;
12851
12919
  if (!this.strictMode) {
12852
- if ((+(value) > +(this.max)) || (+(value) < +(this.min))) {
12920
+ if ((+(value) > +(this.max)) || (+(value) < +(this.min)) || !this.isValidTime(value)) {
12853
12921
  this.isValidState = false;
12854
12922
  }
12855
12923
  }
@@ -12864,6 +12932,54 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12864
12932
  }
12865
12933
  attributes(this.inputElement, { 'aria-invalid': this.isValidState ? 'false' : 'true' });
12866
12934
  };
12935
+ DateTimePicker.prototype.isValidTime = function (value) {
12936
+ if (value != null && (this.minTime || this.maxTime)) {
12937
+ var minTimeValue = void 0;
12938
+ var maxTimeValue = void 0;
12939
+ var maxValue = void 0;
12940
+ var minValue = void 0;
12941
+ var valueTime = value.getHours() * 3600000 + value.getMinutes() * 60000 +
12942
+ value.getSeconds() * 1000 + value.getMilliseconds();
12943
+ if (this.minTime) {
12944
+ minTimeValue = this.minTime.getHours() * 3600000 + this.minTime.getMinutes() * 60000 +
12945
+ this.minTime.getSeconds() * 1000 + this.minTime.getMilliseconds();
12946
+ }
12947
+ if (this.maxTime) {
12948
+ maxTimeValue = this.maxTime.getHours() * 3600000 + this.maxTime.getMinutes() * 60000 +
12949
+ this.maxTime.getSeconds() * 1000 + this.maxTime.getMilliseconds();
12950
+ }
12951
+ if (this.min && (+value.getDate() === +this.min.getDate() && +value.getMonth() === +this.min.getMonth() &&
12952
+ +value.getFullYear() === +this.min.getFullYear())) {
12953
+ minValue = this.min.getHours() * 3600000 + this.min.getMinutes() * 60000 +
12954
+ this.min.getSeconds() * 1000 + this.min.getMilliseconds();
12955
+ minTimeValue = minTimeValue < minValue ? minValue : minTimeValue;
12956
+ }
12957
+ if (this.max && (+value.getDate() === +this.max.getDate() && +value.getMonth() === +this.max.getMonth() &&
12958
+ +this.max.getFullYear() === +this.max.getFullYear())) {
12959
+ maxValue = this.max.getHours() * 3600000 + this.max.getMinutes() * 60000 +
12960
+ this.max.getSeconds() * 1000 + this.max.getMilliseconds();
12961
+ maxTimeValue = maxTimeValue > maxValue ? maxValue : maxTimeValue;
12962
+ }
12963
+ if (this.strictMode) {
12964
+ var newValue = void 0;
12965
+ if (minTimeValue && valueTime < minTimeValue) {
12966
+ newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
12967
+ this.setProperties({ value: newValue }, true);
12968
+ this.changedArgs = { value: this.value };
12969
+ }
12970
+ else if (maxTimeValue && valueTime > maxTimeValue) {
12971
+ newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
12972
+ this.setProperties({ value: newValue }, true);
12973
+ this.changedArgs = { value: this.value };
12974
+ }
12975
+ return true;
12976
+ }
12977
+ else {
12978
+ return !((minTimeValue && valueTime < minTimeValue) || (maxTimeValue && valueTime > maxTimeValue));
12979
+ }
12980
+ }
12981
+ return true;
12982
+ };
12867
12983
  DateTimePicker.prototype.validateValue = function (value) {
12868
12984
  var dateVal = value;
12869
12985
  if (this.strictMode) {
@@ -13082,12 +13198,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13082
13198
  if (this.dateFormatString === '') {
13083
13199
  this.dateFormatString = this.cldrDateTimeFormat();
13084
13200
  }
13085
- dateObject = this.globalize.parseDate(this.inputElement.value, {
13201
+ dateObject = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), {
13086
13202
  format: this.dateFormatString, type: 'datetime'
13087
13203
  });
13088
13204
  }
13089
13205
  else {
13090
- dateObject = this.globalize.parseDate(this.inputElement.value, {
13206
+ dateObject = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), {
13091
13207
  format: this.cldrDateTimeFormat(), type: 'datetime', calendar: 'islamic'
13092
13208
  });
13093
13209
  }
@@ -13560,20 +13676,35 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13560
13676
  var tempStartValue;
13561
13677
  var start;
13562
13678
  var tempMin = this.min;
13679
+ var tempMax = this.max;
13563
13680
  var value = date === null ? new Date() : date;
13564
- if ((+value.getDate() === +tempMin.getDate() && +value.getMonth() === +tempMin.getMonth() &&
13565
- +value.getFullYear() === +tempMin.getFullYear()) || ((+new Date(value.getFullYear(), value.getMonth(), value.getDate())) <=
13566
- +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
13681
+ var isModified = false;
13682
+ var startValue;
13683
+ if (this.minTime) {
13684
+ startValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
13685
+ isModified = true;
13686
+ }
13687
+ else {
13688
+ startValue = value;
13689
+ }
13690
+ if ((+startValue.getDate() === +tempMin.getDate() && +startValue.getMonth() === +tempMin.getMonth() &&
13691
+ +startValue.getFullYear() === +tempMin.getFullYear()) ||
13692
+ ((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate())) <=
13693
+ +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
13567
13694
  start = false;
13568
- tempStartValue = this.min;
13695
+ tempStartValue = tempMin;
13696
+ if (isModified && ((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate(), startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds())) >=
13697
+ +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate(), tempMin.getHours(), tempMin.getMinutes(), tempMin.getSeconds(), tempMin.getMilliseconds()))) {
13698
+ tempStartValue.setHours(startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds());
13699
+ }
13569
13700
  }
13570
- else if (+value < +this.max && +value > +this.min) {
13571
- start = true;
13572
- tempStartValue = value;
13701
+ else if (+startValue < +tempMax && +startValue > +tempMin) {
13702
+ start = !isModified;
13703
+ tempStartValue = startValue;
13573
13704
  }
13574
- else if (+value >= +this.max) {
13705
+ else if (+startValue >= +tempMax) {
13575
13706
  start = true;
13576
- tempStartValue = this.max;
13707
+ tempStartValue = tempMax;
13577
13708
  }
13578
13709
  return this.calculateStartEnd(tempStartValue, start, 'starttime');
13579
13710
  };
@@ -13622,17 +13753,31 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13622
13753
  var end;
13623
13754
  var tempMax = this.max;
13624
13755
  var value = date === null ? new Date() : date;
13625
- if ((+value.getDate() === +tempMax.getDate() && +value.getMonth() === +tempMax.getMonth() &&
13626
- +value.getFullYear() === +tempMax.getFullYear()) || (+new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >=
13627
- +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
13756
+ var isModified = false;
13757
+ var endValue;
13758
+ if (this.maxTime) {
13759
+ endValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
13760
+ isModified = true;
13761
+ }
13762
+ else {
13763
+ endValue = value;
13764
+ }
13765
+ if ((+endValue.getDate() === +tempMax.getDate() && +endValue.getMonth() === +tempMax.getMonth() &&
13766
+ +endValue.getFullYear() === +tempMax.getFullYear()) ||
13767
+ (+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate()) >=
13768
+ +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
13628
13769
  end = false;
13629
13770
  tempEndValue = this.max;
13771
+ if (isModified && (+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate(), endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds()) <=
13772
+ +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate(), tempMax.getHours(), tempMax.getMinutes(), tempMax.getSeconds(), tempMax.getMilliseconds()))) {
13773
+ tempEndValue.setHours(endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds());
13774
+ }
13630
13775
  }
13631
- else if (+value < +this.max && +value > +this.min) {
13632
- end = true;
13633
- tempEndValue = value;
13776
+ else if (+endValue < +this.max && +endValue > +this.min) {
13777
+ end = !isModified;
13778
+ tempEndValue = endValue;
13634
13779
  }
13635
- else if (+value <= +this.min) {
13780
+ else if (+endValue <= +this.min) {
13636
13781
  end = true;
13637
13782
  tempEndValue = this.min;
13638
13783
  }
@@ -14235,6 +14380,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
14235
14380
  __decorate$4([
14236
14381
  Property(new Date(2099, 11, 31))
14237
14382
  ], DateTimePicker.prototype, "max", void 0);
14383
+ __decorate$4([
14384
+ Property(null)
14385
+ ], DateTimePicker.prototype, "minTime", void 0);
14386
+ __decorate$4([
14387
+ Property(null)
14388
+ ], DateTimePicker.prototype, "maxTime", void 0);
14238
14389
  __decorate$4([
14239
14390
  Property(null)
14240
14391
  ], DateTimePicker.prototype, "firstDayOfWeek", void 0);