-
{{ day.daysInfo.dayName }}
{{month.monthInfo.monthName}}
diff --git a/src/app/services/agenda/list-box.service.ts b/src/app/services/agenda/list-box.service.ts
index 5f8335b3c..f6f9c9eb8 100644
--- a/src/app/services/agenda/list-box.service.ts
+++ b/src/app/services/agenda/list-box.service.ts
@@ -105,6 +105,7 @@ export class ListBoxService {
}
display(list: CustomCalendarEvent[], selectedDate) {
+ // console.log("==================!====================================================")
let days = {};
const year: Year[] = []
@@ -138,7 +139,10 @@ export class ListBoxService {
const StartEvent = this.transForm(event, {startMany: true, endMany: false, middle: false})
- if(this.CanPush(event, selectedDate)) {days[day].push(StartEvent); this.push(StartEvent, year)}
+ if(this.CanPush(event, selectedDate)) {
+ // console.log({days: 'days1', StartEvent})
+ days[day].push(StartEvent); this.push(StartEvent, year)
+ }
let i = 1;
@@ -163,12 +167,19 @@ export class ListBoxService {
startDate.getDate() != endDate.getDate())) {
// last push
const EndEvent = this.transForm(event, {startMany: false, endMany: true, middle: false})
- if(this.CanPush(event, selectedDate)) {days[otherDays].push(EndEvent) ; this.push(event, year)}
+ if(this.CanPush(event, selectedDate)) {
+ // console.log({days: 'days2', event})
+ days[otherDays].push(EndEvent) ; this.push(event, year)
+ }
} else {
const EndEvent = this.transForm(event, {startMany: false,endMany: true, middle: true})
- if(this.CanPush(event, selectedDate)) {days[otherDays].push(EndEvent) ; this.push(event, year)}
+ if(this.CanPush(event, selectedDate)) {
+ // console.log({days: 'days3', event})
+ days[otherDays].push(EndEvent) ; this.push(event, year)
+ }
+
}
days[otherDays] = days[otherDays].reverse()
@@ -189,6 +200,7 @@ export class ListBoxService {
})
+ // console.log({days})
// remove days that haven't event
Object.entries(days).forEach(([index, value]) => {
const _value: any = value
@@ -256,6 +268,15 @@ export class ListBoxService {
CanPush(event: any, selectedDate: Date) {
+ const cloneSelectedDate = new Date(selectedDate);
+
+ cloneSelectedDate.setHours(0)
+ cloneSelectedDate.setMinutes(0)
+ cloneSelectedDate.setSeconds(0)
+
+ console.log({event})
+
+
const limite = this.endOfMonth(selectedDate)
limite.setDate(limite.getDate() + 10)
limite.setHours(0)