Skip to content
Snippets Groups Projects
Verified Commit 6ca4aeaf authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Use fullcalendar for calendar view

parent d44a01ea
Branches
No related tags found
No related merge requests found
.cal-tbl {
width: 100%;
height: 100%;
}
\ No newline at end of file
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -52,8 +52,8 @@
</nav>
</head>
<body>
<div class="container">
<br>
<div class="container">
{% block content %}
{% endblock %}
</div>
......
{% extends "base.html" %}
{% load static %}
{% load tc_filters %}
{% block content %}
<table class="table table-responsive">
<tr>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
<tr>
<div id="calendar"></div>
{% endblock %}
</tr>
</table>
{% block page_scripts %}
{{ block.super }}
<script src="{% static "js/fullcalendar.min.js" %}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth'
});
calendar.render();
});
</script>
{% endblock %}
\ No newline at end of file
from django import template
register = template.Library()
@register.filter(name='times')
def times(number):
return range(number)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment