MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / updateDateFilterDisplay

Function updateDateFilterDisplay

codeclash/viewer/static/js/picker.js:1083–1114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1081}
1082
1083function updateDateFilterDisplay() {
1084 // Find all date cells and update their styling
1085 const dateCells = document.querySelectorAll(".date-text");
1086 dateCells.forEach((cell) => {
1087 const cellDate = cell.textContent.trim().split(" ")[0];
1088 if (selectedDate && cellDate === selectedDate) {
1089 cell.classList.add("date-selected");
1090 } else {
1091 cell.classList.remove("date-selected");
1092 }
1093 });
1094
1095 // Update the filter badge
1096 const badge = document.getElementById("date-filter-badge");
1097 const badgeText = document.getElementById("date-filter-text");
1098 const container = document.getElementById("active-filters-container");
1099
1100 if (selectedDate) {
1101 if (badgeText) badgeText.textContent = selectedDate;
1102 if (badge) badge.style.display = "inline-flex";
1103 if (container) container.style.display = "flex";
1104 } else {
1105 if (badge) badge.style.display = "none";
1106 // Hide container if no filters are active
1107 if (container && !hasActiveFilters()) {
1108 container.style.display = "none";
1109 }
1110 }
1111
1112 // Update clear filters button visibility
1113 updateClearFiltersButton();
1114}
1115
1116function hasActiveFilters() {
1117 return (

Callers 4

clearFiltersFunction · 0.85
handleDateClickFunction · 0.85
clearDateFilterFunction · 0.85
loadFiltersFunction · 0.85

Calls 2

hasActiveFiltersFunction · 0.85
updateClearFiltersButtonFunction · 0.85

Tested by

no test coverage detected