mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			608 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			608 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
{% 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();
 | 
						|
    })
 | 
						|
} |