I am currently working on a school project where I am creating a calendar using HTML.
So far, I have set up the basic structure of the page. What I want to achieve is a functional calendar where users can create appointments that will be displayed accordingly.
Here is what I have done so far (it's in Danish, but translation is available upon request):
HTML:
<html>
<head>
<title>December</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script src="javascript.js"></script>
</head>
<body>
<div class="navigation">
<div id="forrige">
<a href="november.html">Previous month</a>
</div>
<div id="naeste">
<a href="januar.html">Next month</a>
</div>
</div>
<br><br>
<table class="ugedage">
<tr>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
//... rest of the table content
CSS:
.ugedage {
width: 95%;
margin-left: 2.5%;
margin-right: 2.5%;
}
//...rest of CSS styles
The JavaScript snippet:
//...JavaScript code
Currently, I have only created calendars for the current month and the next two months manually. If you know a way to automate this process, I would appreciate your input. However, my main concern is how to enable users to add appointments when they click on specific dates in the calendar.
Any guidance on how to achieve this functionality would be very helpful. As I have limited knowledge beyond basic HTML and PHP, implementing such features with JavaScript seems daunting to me.
Feel free to ask for more information if needed. Thank you :-)