2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

Calendar view for purchase orders

This commit is contained in:
Oliver Walters
2021-01-07 23:04:00 +11:00
parent 38b6367453
commit 76c86e7b2f
7 changed files with 193 additions and 22 deletions

View File

@ -0,0 +1,25 @@
{% load i18n %}
/**
* Helper functions for calendar display
*/
function startDate(calendar) {
// Extract the first displayed date on the calendar
return calendar.currentData.dateProfile.activeRange.start.toISOString().split("T")[0];
}
function endDate(calendar) {
// Extract the last display date on the calendar
return calendar.currentData.dateProfile.activeRange.end.toISOString().split("T")[0];
}
function clearEvents(calendar) {
// Remove all events from the calendar
var events = calendar.getEvents();
events.forEach(function(event) {
event.remove();
})
}