+ {/* 7 Background Day Cells with Clear Vertical Borders */}
+ {weekLayout.weekDays.map((day, colIdx) => {
+ const dateStr = day.format('YYYY-MM-DD');
+ const isCurrentMonth = day.month() === currentMonth.month();
+ const isToday = dateStr === todayStr;
+ const isSunday = colIdx === 0;
+ const hiddenCount = weekLayout.hiddenCountPerCol[colIdx];
+
+ const dateLabel =
+ day.date() === 1 ? day.format('D MMM') : String(day.date());
+
+ return (
+
onSelectEmptyDate(dateStr)}
+ style={{ minHeight: `${ROW_MIN_HEIGHT_PX}px` }}
+ className={`group relative flex flex-col justify-between p-2 border-r last:border-r-0 border-zinc-200 dark:border-zinc-800 transition-colors cursor-pointer select-none ${
+ isCurrentMonth
+ ? 'bg-white dark:bg-zinc-900 hover:bg-zinc-50/80 dark:hover:bg-zinc-800/50'
+ : 'bg-zinc-50/70 dark:bg-zinc-950/70 hover:bg-zinc-100/60 dark:hover:bg-zinc-900/60'
+ }`}
+ >
+ {/* Top Row inside Cell: Date Badge & Hover Quick-Add Button */}
+
+
+ {dateLabel}
+
+
+
+
+
+ {/* Bottom Row inside Cell: "+X lainnya" overflow pill */}
+
+ {hiddenCount > 0 && (
+
+ )}
+
+
+ );
+ })}
+
+ {/* Continuous Horizontal Event Lanes Layer */}
+
+ {weekLayout.visibleSegments.map((seg) => {
+ const {
+ event: ev,
+ startCol,
+ span,
+ lane,
+ isBar,
+ continuesBefore,
+ continuesAfter,
+ } = seg;
+ const hex = resolveEventColor(ev);
+ const leftPercent = (startCol / 7) * 100;
+ const widthPercent = (span / 7) * 100;
+ const topPx = lane * LANE_HEIGHT_PX;
+
+ if (isBar) {
+ const timePrefix = !ev.isAllDay
+ ? `${formatGCalShortTime(ev.start)} `
+ : '';
+
+ const leftInset = continuesBefore ? 1 : 6;
+ const rightInset = continuesAfter ? 1 : 6;
+
+ return (
+
+
+
+ );
+ }
+
+ // Single-day timed event pill
+ const shortTime = formatGCalShortTime(ev.start);
+
+ return (
+
+
+
+ );
+ })}
+