Skip to content

Conversation

charlag
Copy link
Contributor

@charlag charlag commented Jul 18, 2025

@@ -81,7 +81,7 @@ export class CalendarAgendaView implements Component<CalendarAgendaViewAttrs> {

const agendaChildren = this.renderAgenda(attrs, isDesktopLayout)

if (attrs.selectedTime && attrs.eventsForDays.size > 0 && this.lastScrolledDate != attrs.selectedDate) {
if (attrs.selectedTime && attrs.eventsForDays.size > 0 && this.lastScrolledDate !== attrs.selectedDate) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to use getTime()

Copy link
Contributor Author

@charlag charlag Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new Date(0) === new Date(0) // false
new Date(0) == new Date(0) // false

we should have done it before too, huh?

Copy link
Contributor

@andrehgdias andrehgdias Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we should've

@@ -216,7 +222,7 @@ function expandByDayRuleForWeeklyEvents(targetWeekDay: any, date: DateTime, wkst
newDate = newDate.plus({ weeks: 1 })
}

if (newDate.toMillis() >= nextEvent || (wkst != WeekDaysJsValue.MO && newDate.toMillis() >= intervalStart.plus({ weeks: 1 }).toMillis())) {
if (newDate.toMillis() >= nextEvent || (wkst !== WeekDaysJsValue.MO && newDate.toMillis() >= intervalStart.plus({ weeks: 1 }).toMillis())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison is using the wrong enum, wkst should be compared against WeekdayNumbers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good catch! could you push up a fix? I'm not sure I know how to fix it

@hrb-hub hrb-hub linked an issue Jul 21, 2025 that may be closed by this pull request
charlag and others added 4 commits July 28, 2025 12:58
Close #9333

Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
@charlag charlag merged commit b2ec66a into dev-mail Jul 28, 2025
6 checks passed
@charlag charlag deleted the stricter-eslint branch July 28, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recipient dropdown does not scroll selected item into the view
5 participants