Skip to content

fix: enable previous month navigation in calendar#1189

Open
tylrx404 wants to merge 2 commits into
Charushi06:mainfrom
tylrx404:fix/calendar-prev-navigation
Open

fix: enable previous month navigation in calendar#1189
tylrx404 wants to merge 2 commits into
Charushi06:mainfrom
tylrx404:fix/calendar-prev-navigation

Conversation

@tylrx404

Copy link
Copy Markdown

Summary

This PR fixes the non-functional Previous Month (‹) button in the calendar.

Root Cause

The cal-prev button existed in the HTML but had no corresponding JavaScript event listener, while the cal-next button was properly wired.

Changes Made

  • Added click event listener for cal-prev
  • Decremented the current month using currentMonthDate.setMonth(currentMonthDate.getMonth() - 1)
  • Re-rendered the calendar after navigation

Testing

  • Verified clicking navigates to the next month
  • Verified clicking navigates to the previous month
  • Confirmed month title and calendar grid update correctly

Fixes #1154

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.

bug: Calendar "Previous Month" (‹) button does nothing

1 participant