@energycap/components 0.39.36-ECAP-26840-date-input.20241119-1203 → 0.39.36-ECAP-26840-date-input.20241121-0843
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/controls/calendar/calendar-item.component.mjs +10 -12
- package/esm2020/lib/core/date-time-helper.mjs +3 -1
- package/fesm2015/energycap-components.mjs +11 -11
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +11 -11
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/controls/calendar/calendar-item.component.d.ts +2 -2
- package/package.json +1 -1
@@ -466,18 +466,16 @@ class CalendarItemComponent {
|
|
466
466
|
this.selected = false;
|
467
467
|
this.outsideActiveMonth = false;
|
468
468
|
}
|
469
|
-
ngOnChanges(
|
470
|
-
if (
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
this.outsideActiveMonth = !moment(this.item?.date).isSame(this.activeDate, 'month');
|
478
|
-
}
|
479
|
-
this.selected = this.isSelected(this.item?.date, this.selection, this.view);
|
469
|
+
ngOnChanges() {
|
470
|
+
if (this.view !== 'day') {
|
471
|
+
this.today = false;
|
472
|
+
this.outsideActiveMonth = false;
|
473
|
+
}
|
474
|
+
else {
|
475
|
+
this.today = moment(this.item?.date).isSame(moment(), 'day');
|
476
|
+
this.outsideActiveMonth = !moment(this.item?.date).isSame(this.activeDate, 'month');
|
480
477
|
}
|
478
|
+
this.selected = this.isSelected(this.item?.date, this.selection, this.view);
|
481
479
|
}
|
482
480
|
isSelected(date, selection, view) {
|
483
481
|
if (!date || !selection) {
|
@@ -672,6 +670,7 @@ DateTimeHelper.momentMonthFirstParseFormats = [
|
|
672
670
|
'MM-DD',
|
673
671
|
'M-D-YY',
|
674
672
|
'MM-DD-YY',
|
673
|
+
'MMDDYYYY',
|
675
674
|
'YYYYMMDD',
|
676
675
|
'YYYY-MM-DD',
|
677
676
|
'MM-DD-YYYY'
|
@@ -708,6 +707,7 @@ DateTimeHelper.momentDateFirstParseFormats = [
|
|
708
707
|
'DD-MM',
|
709
708
|
'D-M-YY',
|
710
709
|
'DD-MM-YY',
|
710
|
+
'DDMMYYYY',
|
711
711
|
'YYYYMMDD',
|
712
712
|
'YYYY-MM-DD',
|
713
713
|
'DD-MM-YYYY'
|