Best practices: Building a calendar view for large database

I’m learning to use Django, and I would like to build a website to view records in a database by date (like a calendar app) in an interactive UI, i.e. the user can click buttons to seamlessly move between specific dates and see records (meetings, events, etc.) corresponding to that date. The database is quite extensive as there are records corresponding to years of data.

My first instinct was to write a javascript-powered HTML template that receives a list (converted into a JS list using appropriate Django tags/filters) of all events in the database and places them appropriately in the calendar. However, this method would probably be extremely inefficient, as it would require thousands of items to be received in the JS code and processed by the front end. So a better strategy would be to load events from the backend only for the viewed dates. How can I achieve this while maintaining the best UI experience?

Some possibilities I had in mind:

[1] One possibility would be to encode the dates to be viewed in the URL, so that the backend can serve the required portions of the database. However, this would harm the user experience since I would not be able to code a dynamic UI with JS/CSS that provides a smooth calendar experience with animations and without page navigation.

[2] Just create a Django REST API as the backend and completely code the frontend independent from Django that makes the appropriate API calls. But maybe this is an overkill, also I ideally don’t want to make an API available for other people to scrape the data from the website.

Are there better options or best practices that I might be missing? My use case feels somehow common, so I’m curious it would typically be solved.

Hello,
If you want to work with calendar, I can suggest you to use third party plugins like full calendar as it will make things much simpler.