@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
@@ -295,8 +295,8 @@ let CalendarBase = class CalendarBase extends Component {
295
295
  getCultureValues() {
296
296
  const culShortNames = [];
297
297
  let cldrObj;
298
- const dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();
299
- if (this.locale === 'en' || this.locale === 'en-US') {
298
+ const dayFormat = !isNullOrUndefined(this.dayHeaderFormat) ? 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase() : null;
299
+ if ((this.locale === 'en' || this.locale === 'en-US') && !isNullOrUndefined(dayFormat)) {
300
300
  cldrObj = (getValue(dayFormat, getDefaultDateObject()));
301
301
  }
302
302
  else {
@@ -483,22 +483,19 @@ let CalendarBase = class CalendarBase extends Component {
483
483
  this.effect = '';
484
484
  switch (e.action) {
485
485
  case 'moveLeft':
486
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
487
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
486
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
488
487
  this.keyboardNavigate(-1, view, e, this.max, this.min);
489
488
  e.preventDefault();
490
489
  }
491
490
  break;
492
491
  case 'moveRight':
493
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
494
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
492
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
495
493
  this.keyboardNavigate(1, view, e, this.max, this.min);
496
494
  e.preventDefault();
497
495
  }
498
496
  break;
499
497
  case 'moveUp':
500
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
501
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
498
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
502
499
  if (view === 0) {
503
500
  this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
504
501
  }
@@ -509,8 +506,7 @@ let CalendarBase = class CalendarBase extends Component {
509
506
  }
510
507
  break;
511
508
  case 'moveDown':
512
- if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
513
- e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
509
+ if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target)) {
514
510
  if (view === 0) {
515
511
  this.keyboardNavigate(7, view, e, this.max, this.min);
516
512
  }
@@ -533,7 +529,12 @@ let CalendarBase = class CalendarBase extends Component {
533
529
  else if (e.target === this.todayElement && !e.target.className.includes(DISABLED)) {
534
530
  this.todayButtonClick(e, value);
535
531
  if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
536
- this.element.focus();
532
+ if (this.isAngular) {
533
+ this.inputElement.focus();
534
+ }
535
+ else {
536
+ this.element.focus();
537
+ }
537
538
  }
538
539
  }
539
540
  else {
@@ -544,7 +545,12 @@ let CalendarBase = class CalendarBase extends Component {
544
545
  const d = new Date(parseInt('' + (element).id, 0));
545
546
  this.selectDate(e, d, (element));
546
547
  if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
547
- this.element.focus();
548
+ if (this.isAngular) {
549
+ this.inputElement.focus();
550
+ }
551
+ else {
552
+ this.element.focus();
553
+ }
548
554
  }
549
555
  }
550
556
  else {
@@ -636,7 +642,12 @@ let CalendarBase = class CalendarBase extends Component {
636
642
  case 'shiftTab':
637
643
  if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.headerTitleElement) {
638
644
  e.preventDefault();
639
- this.element.focus();
645
+ if (this.isAngular) {
646
+ this.inputElement.focus();
647
+ }
648
+ else {
649
+ this.element.focus();
650
+ }
640
651
  this.hide();
641
652
  }
642
653
  break;
@@ -730,13 +741,13 @@ let CalendarBase = class CalendarBase extends Component {
730
741
  tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);
731
742
  }
732
743
  else {
733
- tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);
744
+ tdEles = !isNullOrUndefined(this.islamicModule) ? this.islamicModule.islamicRenderDays(this.currentDate, value) : null;
734
745
  }
735
746
  this.createContentHeader();
736
747
  if (this.calendarMode === 'Gregorian') {
737
748
  this.renderTemplate(tdEles, numCells, MONTH, e, value);
738
749
  }
739
- else {
750
+ else if (!isNullOrUndefined(this.islamicModule)) {
740
751
  this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);
741
752
  }
742
753
  }
@@ -1024,7 +1035,7 @@ let CalendarBase = class CalendarBase extends Component {
1024
1035
  return this.createElement('td', attrs);
1025
1036
  }
1026
1037
  firstDay(date) {
1027
- const collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '') :
1038
+ const collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td:not(.' + OTHERMONTH + '):not(.' + WEEKNUMBER + ')') :
1028
1039
  this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '');
1029
1040
  if (collection.length) {
1030
1041
  for (let i = 0; i < collection.length; i++) {
@@ -1055,7 +1066,7 @@ let CalendarBase = class CalendarBase extends Component {
1055
1066
  }
1056
1067
  findLastDay(date) {
1057
1068
  const collection = this.currentView() === 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '') :
1058
- this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '');
1069
+ this.tableBodyElement.querySelectorAll('td:not(.' + OTHERMONTH + '):not(.' + WEEKNUMBER + ')');
1059
1070
  if (collection.length) {
1060
1071
  for (let i = collection.length - 1; i >= 0; i--) {
1061
1072
  if (!collection[i].classList.contains(DISABLED)) {
@@ -1686,8 +1697,8 @@ let CalendarBase = class CalendarBase extends Component {
1686
1697
  }
1687
1698
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1688
1699
  getCultureObjects(ld, c) {
1689
- const gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();
1690
- const islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();
1700
+ const gregorianFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
1701
+ const islamicFormat = !isNullOrUndefined(this.dayHeaderFormat) ? '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase() : null;
1691
1702
  const mainVal = 'main.';
1692
1703
  if (this.calendarMode === 'Gregorian') {
1693
1704
  return getValue(mainVal + '' + this.locale + gregorianFormat, ld);
@@ -2644,6 +2655,7 @@ let Calendar = class Calendar extends CalendarBase {
2644
2655
  if (!isNullOrUndefined(this.value)) {
2645
2656
  this.setProperties({ value: this.value }, true);
2646
2657
  }
2658
+ // eslint-disable-next-line
2647
2659
  if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
2648
2660
  !isNullOrUndefined(this.previousDate) || this.previousDate === null
2649
2661
  && !isNaN(+this.value))) {
@@ -3377,7 +3389,7 @@ let DatePicker = class DatePicker extends Calendar {
3377
3389
  const ariaAttrs = {
3378
3390
  'aria-atomic': 'true', 'aria-expanded': 'false',
3379
3391
  'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
3380
- 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false', 'aria-label': this.getModuleName()
3392
+ 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
3381
3393
  };
3382
3394
  if (this.getModuleName() === 'datepicker') {
3383
3395
  const l10nLocale = { placeholder: this.placeholder };
@@ -3415,6 +3427,9 @@ let DatePicker = class DatePicker extends Calendar {
3415
3427
  this.inputElement.setAttribute('name', '' + this.element.id);
3416
3428
  }
3417
3429
  attributes(this.inputElement, ariaAttrs);
3430
+ if (!this.inputElement.hasAttribute('aria-label')) {
3431
+ this.inputElement.setAttribute('aria-label', this.getModuleName());
3432
+ }
3418
3433
  if (!this.enabled) {
3419
3434
  this.inputElement.setAttribute('aria-disabled', 'true');
3420
3435
  this.inputElement.tabIndex = -1;
@@ -3528,9 +3543,9 @@ let DatePicker = class DatePicker extends Calendar {
3528
3543
  formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
3529
3544
  }
3530
3545
  }
3531
- returnDate = this.checkDateValue(this.globalize.parseDate(val, formatOptions));
3546
+ returnDate = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(val), formatOptions));
3532
3547
  if (isNullOrUndefined(returnDate) && (this.getModuleName() === 'datetimepicker')) {
3533
- returnDate = this.checkDateValue(this.globalize.parseDate(val, formatDateTime));
3548
+ returnDate = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(val), formatDateTime));
3534
3549
  }
3535
3550
  return returnDate;
3536
3551
  }
@@ -4121,9 +4136,8 @@ let DatePicker = class DatePicker extends Calendar {
4121
4136
  this.inputElement.value = this.inputElement.value.trim();
4122
4137
  }
4123
4138
  if ((this.getModuleName() === 'datetimepicker')) {
4124
- if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
4125
- const modifiedValue = this.inputElement.value.replace(/(am|pm|Am|aM|pM|Pm)/g, (match) => match.toLocaleUpperCase());
4126
- date = this.globalize.parseDate(modifiedValue, dateOptions);
4139
+ if (this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions))) {
4140
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4127
4141
  }
4128
4142
  else {
4129
4143
  if (this.calendarMode === 'Gregorian') {
@@ -4132,11 +4146,11 @@ let DatePicker = class DatePicker extends Calendar {
4132
4146
  else {
4133
4147
  formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
4134
4148
  }
4135
- date = this.globalize.parseDate(this.inputElement.value, formatOptions);
4149
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), formatOptions);
4136
4150
  }
4137
4151
  }
4138
4152
  else {
4139
- date = this.globalize.parseDate(this.inputElement.value, dateOptions);
4153
+ date = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), dateOptions);
4140
4154
  date = (!isNullOrUndefined(date) && isNaN(+date)) ? null : date;
4141
4155
  if (!isNullOrUndefined(this.formatString) && this.inputElement.value !== '' && this.strictMode) {
4142
4156
  if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))
@@ -4245,6 +4259,20 @@ let DatePicker = class DatePicker extends Calendar {
4245
4259
  this.popupObj.element.className += ' ' + this.cssClass;
4246
4260
  this.setAriaAttributes();
4247
4261
  }
4262
+ getAmPmValue(date) {
4263
+ try {
4264
+ if (typeof date === 'string' && date.trim() !== '') {
4265
+ // Replace am/pm variants with uppercase AM/PM
4266
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, (match) => match.toLocaleUpperCase());
4267
+ }
4268
+ // If date is null, undefined, or an empty string, return a default value or empty string
4269
+ return '';
4270
+ }
4271
+ catch (error) {
4272
+ console.error('Error occurred while processing date:', error);
4273
+ return ''; // Return a default value in case of an error
4274
+ }
4275
+ }
4248
4276
  CalendarSwipeHandler(e) {
4249
4277
  let direction = 0;
4250
4278
  if (this.iconRight) {
@@ -4671,7 +4699,6 @@ let DatePicker = class DatePicker extends Calendar {
4671
4699
  if (this.showClearButton) {
4672
4700
  this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
4673
4701
  }
4674
- this.hide(null);
4675
4702
  super.destroy();
4676
4703
  Input.destroy({
4677
4704
  element: this.inputElement,
@@ -4687,8 +4714,11 @@ let DatePicker = class DatePicker extends Calendar {
4687
4714
  const ariaAttrs = {
4688
4715
  'aria-atomic': 'true', 'aria-disabled': 'true',
4689
4716
  'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
4690
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-label': this.getModuleName()
4717
+ 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
4691
4718
  };
4719
+ if (this.inputElement.hasAttribute('aria-label')) {
4720
+ this.inputElement.removeAttribute('aria-label');
4721
+ }
4692
4722
  if (this.inputElement) {
4693
4723
  Input.removeAttributes(ariaAttrs, this.inputElement);
4694
4724
  if (!isNullOrUndefined(this.inputElementCopy.getAttribute('tabindex'))) {
@@ -4922,19 +4952,19 @@ let DatePicker = class DatePicker extends Calendar {
4922
4952
  case 'value':
4923
4953
  if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['value'] === undefined)) || dynamic)) {
4924
4954
  const value = this.inputElement.getAttribute(prop);
4925
- this.setProperties(setValue(prop, this.globalize.parseDate(value, options), {}), !dynamic);
4955
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(value), options), {}), !dynamic);
4926
4956
  }
4927
4957
  break;
4928
4958
  case 'min':
4929
4959
  if ((+this.min === +new Date(1900, 0, 1)) || dynamic) {
4930
4960
  const min = this.inputElement.getAttribute(prop);
4931
- this.setProperties(setValue(prop, this.globalize.parseDate(min, options), {}), !dynamic);
4961
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(min), options), {}), !dynamic);
4932
4962
  }
4933
4963
  break;
4934
4964
  case 'max':
4935
4965
  if ((+this.max === +new Date(2099, 11, 31)) || dynamic) {
4936
4966
  const max = this.inputElement.getAttribute(prop);
4937
- this.setProperties(setValue(prop, this.globalize.parseDate(max, options), {}), !dynamic);
4967
+ this.setProperties(setValue(prop, this.globalize.parseDate(this.getAmPmValue(max), options), {}), !dynamic);
4938
4968
  }
4939
4969
  break;
4940
4970
  case 'type':
@@ -5037,9 +5067,11 @@ let DatePicker = class DatePicker extends Calendar {
5037
5067
  this.calendarElement.querySelectorAll(dateIdString)[0] &&
5038
5068
  this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
5039
5069
  if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
5040
- !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
5070
+ !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >=
5071
+ new Date(this.min).setMilliseconds(0)
5041
5072
  && new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
5042
- || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
5073
+ || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue &&
5074
+ isNullOrUndefined(this.value) || isDisabledDate) || !this.isValidTime(this.value)) {
5043
5075
  addClass([this.inputWrapper.container], ERROR);
5044
5076
  attributes(this.inputElement, { 'aria-invalid': 'true' });
5045
5077
  }
@@ -5048,6 +5080,9 @@ let DatePicker = class DatePicker extends Calendar {
5048
5080
  attributes(this.inputElement, { 'aria-invalid': 'false' });
5049
5081
  }
5050
5082
  }
5083
+ isValidTime(value) {
5084
+ return true;
5085
+ }
5051
5086
  /**
5052
5087
  * Called internally if any of the property value changed.
5053
5088
  *
@@ -5735,7 +5770,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
5735
5770
  processPresets() {
5736
5771
  this.presetsItem = [];
5737
5772
  let i = 0;
5738
- if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
5773
+ if (!isNullOrUndefined(this.presets[0]) && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
5739
5774
  for (const range of this.presets) {
5740
5775
  const id = range.label.replace(/\s+/g, '') + '_' + (++i);
5741
5776
  if (typeof range.end === 'string') {
@@ -5804,10 +5839,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
5804
5839
  if (this.firstHiddenChild && this.secondHiddenChild) {
5805
5840
  const format = { format: this.formatString, type: 'datetime', skeleton: 'yMd' };
5806
5841
  if (typeof this.startDate === 'string') {
5807
- this.startDate = this.globalize.parseDate(this.startDate, format);
5842
+ this.startDate = this.globalize.parseDate(this.getAmPmValue(this.startDate), format);
5808
5843
  }
5809
5844
  if (typeof this.endDate === 'string') {
5810
- this.endDate = this.globalize.parseDate(this.endDate, format);
5845
+ this.endDate = this.globalize.parseDate(this.getAmPmValue(this.endDate), format);
5811
5846
  }
5812
5847
  this.firstHiddenChild.value = (this.startDate && this.globalize.formatDate(this.startDate, format))
5813
5848
  || (this.inputElement.value);
@@ -5982,7 +6017,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
5982
6017
  break;
5983
6018
  case 'min':
5984
6019
  if ((isNullOrUndefined(this.min) || +this.min === +new Date(1900, 0, 1)) || isDynamic) {
5985
- const dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6020
+ const dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
5986
6021
  this.setProperties(setValue(prop, dateValue, {}), !isDynamic);
5987
6022
  }
5988
6023
  break;
@@ -5991,20 +6026,20 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
5991
6026
  break;
5992
6027
  case 'max':
5993
6028
  if ((isNullOrUndefined(this.max) || +this.max === +new Date(2099, 11, 31)) || isDynamic) {
5994
- const dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6029
+ const dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
5995
6030
  this.setProperties(setValue(prop, dateValue, {}), !isDynamic);
5996
6031
  }
5997
6032
  break;
5998
6033
  case 'startDate':
5999
6034
  if (isNullOrUndefined(this.startDate)) {
6000
- const dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6035
+ const dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6001
6036
  this.startValue = dateValue;
6002
6037
  this.setValue();
6003
6038
  }
6004
6039
  break;
6005
6040
  case 'endDate':
6006
6041
  if (isNullOrUndefined(this.endDate)) {
6007
- const dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
6042
+ const dateValue = this.globalize.parseDate(this.getAmPmValue(this.inputElement.getAttribute(prop)), format);
6008
6043
  this.endValue = dateValue;
6009
6044
  this.setValue();
6010
6045
  }
@@ -6239,8 +6274,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6239
6274
  if (range.length > 1) {
6240
6275
  this.invalidValueString = null;
6241
6276
  const dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
6242
- const start = this.globalize.parseDate(range[0], dateOptions);
6243
- const end = this.globalize.parseDate(range[1], dateOptions);
6277
+ const start = this.globalize.parseDate(this.getAmPmValue(range[0]), dateOptions);
6278
+ const end = this.globalize.parseDate(this.getAmPmValue(range[1]), dateOptions);
6244
6279
  const startDate = this.getStartEndDate(start, false, range, dateOptions);
6245
6280
  const endDate = this.getStartEndDate(end, true, range, dateOptions);
6246
6281
  if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
@@ -6316,7 +6351,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6316
6351
  }
6317
6352
  getStartEndDate(date, isEnd, range, dateOptions) {
6318
6353
  if (this.depth === 'Month') {
6319
- return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
6354
+ return this.globalize.parseDate(this.getAmPmValue(range[isEnd ? 1 : 0]).trim(), dateOptions);
6320
6355
  }
6321
6356
  else if (this.depth === 'Year' && !isNullOrUndefined(date)) {
6322
6357
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
@@ -6333,7 +6368,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6333
6368
  this.currentDate = null;
6334
6369
  }
6335
6370
  errorClass() {
6336
- const inputStr = this.inputElement.value.trim();
6371
+ const inputStr = !isNullOrUndefined(this.inputElement.value) ? this.inputElement.value.trim() : null;
6337
6372
  if (((isNullOrUndefined(this.endValue) && isNullOrUndefined(this.startValue) && inputStr !== '') ||
6338
6373
  ((!isNullOrUndefined(this.startValue) && +this.startValue < +this.min)
6339
6374
  || ((!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) && +this.startValue > +this.endValue)
@@ -9508,6 +9543,20 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9508
9543
  this.updateHeader();
9509
9544
  }
9510
9545
  }
9546
+ getAmPmValue(date) {
9547
+ try {
9548
+ if (typeof date === 'string' && date.trim() !== '') {
9549
+ // Replace am/pm variants with uppercase AM/PM
9550
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, (match) => match.toLocaleUpperCase());
9551
+ }
9552
+ // If date is null, undefined, or an empty string, return a default value or empty string
9553
+ return '';
9554
+ }
9555
+ catch (error) {
9556
+ console.error('Error occurred while processing date:', error);
9557
+ return ''; // Return a default value in case of an error
9558
+ }
9559
+ }
9511
9560
  getStartEndValue(date, isEnd) {
9512
9561
  if (this.depth === 'Month') {
9513
9562
  return this.checkDateValue(new Date(this.checkValue(date)));
@@ -9607,7 +9656,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9607
9656
  break;
9608
9657
  case 'startDate':
9609
9658
  if (typeof newProp.startDate === 'string') {
9610
- newProp.startDate = this.globalize.parseDate(newProp.startDate, format);
9659
+ newProp.startDate = this.globalize.parseDate(this.getAmPmValue(newProp.startDate), format);
9611
9660
  }
9612
9661
  if (+this.initStartDate !== +newProp.startDate) {
9613
9662
  this.startValue = this.getStartEndValue(newProp.startDate, false);
@@ -9617,7 +9666,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9617
9666
  break;
9618
9667
  case 'endDate':
9619
9668
  if (typeof newProp.endDate === 'string') {
9620
- newProp.endDate = this.globalize.parseDate(newProp.endDate, format);
9669
+ newProp.endDate = this.globalize.parseDate(this.getAmPmValue(newProp.endDate), format);
9621
9670
  }
9622
9671
  if (+this.initEndDate !== +newProp.endDate) {
9623
9672
  this.endValue = this.getStartEndValue(newProp.endDate, true);
@@ -10257,18 +10306,18 @@ let TimePicker = class TimePicker extends Component {
10257
10306
  if (!(/^[a-zA-Z0-9- ]*$/).test(value)) {
10258
10307
  valueExpression = this.setCurrentDate(this.getDateObject(value));
10259
10308
  if (isNullOrUndefined(valueExpression)) {
10260
- valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
10309
+ valueExpression = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(valueString), {
10261
10310
  format: this.getCldrDateTimeFormat(), type: 'datetime'
10262
10311
  }));
10263
10312
  if (isNullOrUndefined(valueExpression)) {
10264
- valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {
10313
+ valueExpression = this.checkDateValue(this.globalize.parseDate(this.getAmPmValue(valueString), {
10265
10314
  format: this.formatString, type: 'dateTime', skeleton: 'yMd'
10266
10315
  }));
10267
10316
  }
10268
10317
  }
10269
10318
  }
10270
10319
  }
10271
- valueExp = this.globalize.parseDate(valueString, {
10320
+ valueExp = this.globalize.parseDate(this.getAmPmValue(valueString), {
10272
10321
  format: this.getCldrDateTimeFormat(), type: 'datetime'
10273
10322
  });
10274
10323
  valueExpression = (!isNullOrUndefined(valueExp) && valueExp instanceof Date && !isNaN(+valueExp)) ? valueExp : null;
@@ -10307,6 +10356,20 @@ let TimePicker = class TimePicker extends Component {
10307
10356
  }
10308
10357
  return modules;
10309
10358
  }
10359
+ getAmPmValue(date) {
10360
+ try {
10361
+ if (typeof date === 'string' && date.trim() !== '') {
10362
+ // Replace am/pm variants with uppercase AM/PM
10363
+ return date.replace(/(am|pm|Am|aM|pM|Pm)/g, (match) => match.toLocaleUpperCase());
10364
+ }
10365
+ // If date is null, undefined, or an empty string, return a default value or empty string
10366
+ return '';
10367
+ }
10368
+ catch (error) {
10369
+ console.error('Error occurred while processing date:', error);
10370
+ return ''; // Return a default value in case of an error
10371
+ }
10372
+ }
10310
10373
  cldrFormat(type) {
10311
10374
  let cldrDateTimeString;
10312
10375
  if (this.locale === 'en' || this.locale === 'en-US') {
@@ -11078,7 +11141,7 @@ let TimePicker = class TimePicker extends Component {
11078
11141
  return dateVal;
11079
11142
  }
11080
11143
  valueIsDisable(value) {
11081
- if (this.disableItemCollection.length > 0) {
11144
+ if (!isNullOrUndefined(this.disableItemCollection) && this.disableItemCollection.length > 0) {
11082
11145
  if (this.disableItemCollection.length === this.timeCollections.length) {
11083
11146
  return false;
11084
11147
  }
@@ -11807,10 +11870,10 @@ let TimePicker = class TimePicker extends Component {
11807
11870
  }
11808
11871
  timeParse(today, val) {
11809
11872
  let value;
11810
- value = this.globalize.parseDate(today + ' ' + val, {
11873
+ value = this.globalize.parseDate(this.getAmPmValue(today + ' ' + val), {
11811
11874
  format: this.cldrDateFormat() + ' ' + this.cldrTimeFormat(), type: 'datetime'
11812
11875
  });
11813
- value = isNullOrUndefined(value) ? this.globalize.parseDate(today + ' ' + val, {
11876
+ value = isNullOrUndefined(value) ? this.globalize.parseDate(this.getAmPmValue(today + ' ' + val), {
11814
11877
  format: this.cldrDateFormat() + ' ' + this.dateToNumeric(), type: 'datetime'
11815
11878
  }) : value;
11816
11879
  value = isNullOrUndefined(value) ? value : new Date(value.setMilliseconds(0));
@@ -12564,7 +12627,6 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12564
12627
  if (this.showClearButton) {
12565
12628
  this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
12566
12629
  }
12567
- this.hide(null);
12568
12630
  if (this.popupObject && this.popupObject.element.classList.contains(POPUP$3)) {
12569
12631
  this.popupObject.destroy();
12570
12632
  detach(this.dateTimeWrapper);
@@ -12637,6 +12699,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12637
12699
  if (typeof (this.max) === 'string') {
12638
12700
  this.max = this.checkDateValue(new Date(this.max));
12639
12701
  }
12702
+ if (typeof (this.minTime) === 'string') {
12703
+ this.minTime = this.checkDateValue(new Date(this.minTime));
12704
+ }
12705
+ if (typeof (this.maxTime) === 'string') {
12706
+ this.maxTime = this.checkDateValue(new Date(this.maxTime));
12707
+ }
12640
12708
  if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
12641
12709
  this.enabled = false;
12642
12710
  }
@@ -12707,7 +12775,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12707
12775
  checkValidState(value) {
12708
12776
  this.isValidState = true;
12709
12777
  if (!this.strictMode) {
12710
- if ((+(value) > +(this.max)) || (+(value) < +(this.min))) {
12778
+ if ((+(value) > +(this.max)) || (+(value) < +(this.min)) || !this.isValidTime(value)) {
12711
12779
  this.isValidState = false;
12712
12780
  }
12713
12781
  }
@@ -12722,6 +12790,54 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12722
12790
  }
12723
12791
  attributes(this.inputElement, { 'aria-invalid': this.isValidState ? 'false' : 'true' });
12724
12792
  }
12793
+ isValidTime(value) {
12794
+ if (value != null && (this.minTime || this.maxTime)) {
12795
+ let minTimeValue;
12796
+ let maxTimeValue;
12797
+ let maxValue;
12798
+ let minValue;
12799
+ const valueTime = value.getHours() * 3600000 + value.getMinutes() * 60000 +
12800
+ value.getSeconds() * 1000 + value.getMilliseconds();
12801
+ if (this.minTime) {
12802
+ minTimeValue = this.minTime.getHours() * 3600000 + this.minTime.getMinutes() * 60000 +
12803
+ this.minTime.getSeconds() * 1000 + this.minTime.getMilliseconds();
12804
+ }
12805
+ if (this.maxTime) {
12806
+ maxTimeValue = this.maxTime.getHours() * 3600000 + this.maxTime.getMinutes() * 60000 +
12807
+ this.maxTime.getSeconds() * 1000 + this.maxTime.getMilliseconds();
12808
+ }
12809
+ if (this.min && (+value.getDate() === +this.min.getDate() && +value.getMonth() === +this.min.getMonth() &&
12810
+ +value.getFullYear() === +this.min.getFullYear())) {
12811
+ minValue = this.min.getHours() * 3600000 + this.min.getMinutes() * 60000 +
12812
+ this.min.getSeconds() * 1000 + this.min.getMilliseconds();
12813
+ minTimeValue = minTimeValue < minValue ? minValue : minTimeValue;
12814
+ }
12815
+ if (this.max && (+value.getDate() === +this.max.getDate() && +value.getMonth() === +this.max.getMonth() &&
12816
+ +this.max.getFullYear() === +this.max.getFullYear())) {
12817
+ maxValue = this.max.getHours() * 3600000 + this.max.getMinutes() * 60000 +
12818
+ this.max.getSeconds() * 1000 + this.max.getMilliseconds();
12819
+ maxTimeValue = maxTimeValue > maxValue ? maxValue : maxTimeValue;
12820
+ }
12821
+ if (this.strictMode) {
12822
+ let newValue;
12823
+ if (minTimeValue && valueTime < minTimeValue) {
12824
+ newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
12825
+ this.setProperties({ value: newValue }, true);
12826
+ this.changedArgs = { value: this.value };
12827
+ }
12828
+ else if (maxTimeValue && valueTime > maxTimeValue) {
12829
+ newValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
12830
+ this.setProperties({ value: newValue }, true);
12831
+ this.changedArgs = { value: this.value };
12832
+ }
12833
+ return true;
12834
+ }
12835
+ else {
12836
+ return !((minTimeValue && valueTime < minTimeValue) || (maxTimeValue && valueTime > maxTimeValue));
12837
+ }
12838
+ }
12839
+ return true;
12840
+ }
12725
12841
  validateValue(value) {
12726
12842
  let dateVal = value;
12727
12843
  if (this.strictMode) {
@@ -12940,12 +13056,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12940
13056
  if (this.dateFormatString === '') {
12941
13057
  this.dateFormatString = this.cldrDateTimeFormat();
12942
13058
  }
12943
- dateObject = this.globalize.parseDate(this.inputElement.value, {
13059
+ dateObject = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), {
12944
13060
  format: this.dateFormatString, type: 'datetime'
12945
13061
  });
12946
13062
  }
12947
13063
  else {
12948
- dateObject = this.globalize.parseDate(this.inputElement.value, {
13064
+ dateObject = this.globalize.parseDate(this.getAmPmValue(this.inputElement.value), {
12949
13065
  format: this.cldrDateTimeFormat(), type: 'datetime', calendar: 'islamic'
12950
13066
  });
12951
13067
  }
@@ -13416,20 +13532,35 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13416
13532
  let tempStartValue;
13417
13533
  let start;
13418
13534
  const tempMin = this.min;
13535
+ const tempMax = this.max;
13419
13536
  const value = date === null ? new Date() : date;
13420
- if ((+value.getDate() === +tempMin.getDate() && +value.getMonth() === +tempMin.getMonth() &&
13421
- +value.getFullYear() === +tempMin.getFullYear()) || ((+new Date(value.getFullYear(), value.getMonth(), value.getDate())) <=
13422
- +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
13537
+ let isModified = false;
13538
+ let startValue;
13539
+ if (this.minTime) {
13540
+ startValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.minTime.getHours(), this.minTime.getMinutes(), this.minTime.getSeconds(), this.minTime.getMilliseconds());
13541
+ isModified = true;
13542
+ }
13543
+ else {
13544
+ startValue = value;
13545
+ }
13546
+ if ((+startValue.getDate() === +tempMin.getDate() && +startValue.getMonth() === +tempMin.getMonth() &&
13547
+ +startValue.getFullYear() === +tempMin.getFullYear()) ||
13548
+ ((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate())) <=
13549
+ +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {
13423
13550
  start = false;
13424
- tempStartValue = this.min;
13551
+ tempStartValue = tempMin;
13552
+ if (isModified && ((+new Date(startValue.getFullYear(), startValue.getMonth(), startValue.getDate(), startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds())) >=
13553
+ +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate(), tempMin.getHours(), tempMin.getMinutes(), tempMin.getSeconds(), tempMin.getMilliseconds()))) {
13554
+ tempStartValue.setHours(startValue.getHours(), startValue.getMinutes(), startValue.getSeconds(), startValue.getMilliseconds());
13555
+ }
13425
13556
  }
13426
- else if (+value < +this.max && +value > +this.min) {
13427
- start = true;
13428
- tempStartValue = value;
13557
+ else if (+startValue < +tempMax && +startValue > +tempMin) {
13558
+ start = !isModified;
13559
+ tempStartValue = startValue;
13429
13560
  }
13430
- else if (+value >= +this.max) {
13561
+ else if (+startValue >= +tempMax) {
13431
13562
  start = true;
13432
- tempStartValue = this.max;
13563
+ tempStartValue = tempMax;
13433
13564
  }
13434
13565
  return this.calculateStartEnd(tempStartValue, start, 'starttime');
13435
13566
  }
@@ -13478,17 +13609,31 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13478
13609
  let end;
13479
13610
  const tempMax = this.max;
13480
13611
  const value = date === null ? new Date() : date;
13481
- if ((+value.getDate() === +tempMax.getDate() && +value.getMonth() === +tempMax.getMonth() &&
13482
- +value.getFullYear() === +tempMax.getFullYear()) || (+new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >=
13483
- +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
13612
+ let isModified = false;
13613
+ let endValue;
13614
+ if (this.maxTime) {
13615
+ endValue = new Date(value.getFullYear(), value.getMonth(), value.getDate(), this.maxTime.getHours(), this.maxTime.getMinutes(), this.maxTime.getSeconds(), this.maxTime.getMilliseconds());
13616
+ isModified = true;
13617
+ }
13618
+ else {
13619
+ endValue = value;
13620
+ }
13621
+ if ((+endValue.getDate() === +tempMax.getDate() && +endValue.getMonth() === +tempMax.getMonth() &&
13622
+ +endValue.getFullYear() === +tempMax.getFullYear()) ||
13623
+ (+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate()) >=
13624
+ +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {
13484
13625
  end = false;
13485
13626
  tempEndValue = this.max;
13627
+ if (isModified && (+new Date(endValue.getUTCFullYear(), endValue.getMonth(), endValue.getDate(), endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds()) <=
13628
+ +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate(), tempMax.getHours(), tempMax.getMinutes(), tempMax.getSeconds(), tempMax.getMilliseconds()))) {
13629
+ tempEndValue.setHours(endValue.getHours(), endValue.getMinutes(), endValue.getSeconds(), endValue.getMilliseconds());
13630
+ }
13486
13631
  }
13487
- else if (+value < +this.max && +value > +this.min) {
13488
- end = true;
13489
- tempEndValue = value;
13632
+ else if (+endValue < +this.max && +endValue > +this.min) {
13633
+ end = !isModified;
13634
+ tempEndValue = endValue;
13490
13635
  }
13491
- else if (+value <= +this.min) {
13636
+ else if (+endValue <= +this.min) {
13492
13637
  end = true;
13493
13638
  tempEndValue = this.min;
13494
13639
  }
@@ -14089,6 +14234,12 @@ __decorate$4([
14089
14234
  __decorate$4([
14090
14235
  Property(new Date(2099, 11, 31))
14091
14236
  ], DateTimePicker.prototype, "max", void 0);
14237
+ __decorate$4([
14238
+ Property(null)
14239
+ ], DateTimePicker.prototype, "minTime", void 0);
14240
+ __decorate$4([
14241
+ Property(null)
14242
+ ], DateTimePicker.prototype, "maxTime", void 0);
14092
14243
  __decorate$4([
14093
14244
  Property(null)
14094
14245
  ], DateTimePicker.prototype, "firstDayOfWeek", void 0);