Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Calendar GUI

Description

A full-featured interactive calendar application with event management, persistent storage, and intuitive GUI. Track appointments, reminders, and important dates.

Features

  • Monthly calendar view
  • Event management (add/view/delete)
  • Today highlighting
  • Event indicators
  • Month navigation
  • Persistent storage (JSON)
  • Color-coded days
  • Event list display
  • Click-to-interact
  • Clean, modern interface

Stack

  • Language: Pure Python
  • Libraries:
    • tkinter (standard library - GUI)
    • calendar (standard library - date calculations)
    • json (standard library - data storage)
  • Complexity: Intermediate-Advanced

Installation & Usage

No external dependencies required!

python main.py

Features Explained

Calendar Display

  • Today: Highlighted in red
  • Events: Orange background
  • Regular days: White background
  • Empty cells: Gray background

Event Management

  1. Add Event: Click day → Choose option 2
  2. View Events: Click day → Choose option 1
  3. Delete Event: Click day → Choose option 3

Navigation

  • Previous: Go to previous month
  • Next: Go to next month
  • Today: Jump to current month

Data Persistence

  • Events saved to calendar_events.json
  • Automatic save on changes
  • Loads on startup

How to Use

Adding Events

  1. Click on any day
  2. Enter "2" for Add Event
  3. Type event description
  4. Click OK

Viewing Events

  1. Click on day with events (orange)
  2. Enter "1" for View Events
  3. See list of events

Deleting Events

  1. Click on day with events
  2. Enter "3" for Delete Event
  3. Enter event number to delete

Use Cases

  • Personal: Track appointments
  • Work: Meeting schedules
  • School: Assignment deadlines
  • Events: Party planning
  • Reminders: Important dates
  • Birthdays: Never forget!
  • Holidays: Mark special days

Learning Outcomes

  • Tkinter grid layout
  • Calendar module usage
  • JSON file handling
  • Event-driven programming
  • Date manipulation
  • GUI design patterns
  • Data persistence

Technical Details

Date Format

date_str = "YYYY-MM-DD"  # e.g., "2024-10-12"

Events Storage

{
  "2024-10-12": ["Meeting at 2 PM", "Dentist appointment"],
  "2024-10-15": ["Birthday party"]
}

Color Scheme

  • Today: #e74c3c (Red)
  • Events: #f39c12 (Orange)
  • Regular: #ffffff (White)
  • Header: #34495e (Dark gray)

Customization

Change Colors

# In display_calendar() method
bg_color = "#your_color"

Adjust Size

# In __init__() method
self.root.geometry("800x700")  # width x height

Event Storage Location

# In load_events() and save_events()
filename = 'calendar_events.json'

Future Enhancements

  • Recurring events
  • Event categories/colors
  • Time-specific events
  • Reminders/notifications
  • Search functionality
  • Export to iCal
  • Import from Google Calendar
  • Week view
  • Year view
  • Event priorities
  • Multiple calendars
  • Sharing capabilities
  • Mobile sync

Tips

  • Double-click for quick add
  • Use descriptive event names
  • Review events regularly
  • Backup events file
  • Color-code by category
  • Set reminders in advance

Keyboard Shortcuts (Future)

  • Previous month
  • Next month
  • T Today
  • N New event
  • D Delete event

Troubleshooting

Events not saving

  • Check file permissions
  • Verify JSON format
  • Check disk space

Calendar not displaying

  • Check date calculations
  • Verify month/year values
  • Restart application

Click not working

  • Ensure day has number
  • Check event binding
  • Try different day

Real-World Applications

Business

  • Meeting scheduler
  • Project deadlines
  • Client appointments
  • Team calendar

Education

  • Class schedule
  • Exam dates
  • Assignment due dates
  • School events

Personal

  • Birthday reminders
  • Anniversary dates
  • Vacation planning
  • Health appointments

Comparison with Other Calendars

Feature This App Google Calendar Outlook
Offline
Free Paid
Simple
Customizable Limited Limited
Privacy

License

Open source for educational purposes.