feat: enhance calendar with view sync, Redux fixes, and dynamic slot label dimming

- Sync calendar view state between Calendar and Menubar components
- Fix Redux serialization errors by using string dates instead of Date objects
- Add null checks for eventResize handler to prevent undefined errors
- Implement dynamic slot label dimming near current time indicator
- Slot labels fade to opacity 0.2 when now indicator is within 15 minutes
- Add smooth CSS transitions for better user experience
- Handle edge cases around midnight for proper time calculation
- Update slot label visibility on view changes and time updates
This commit is contained in:
lenhanphung
2025-09-25 14:57:04 +07:00
parent 24efa2b62e
commit b9d7a8fa6b
5 changed files with 72 additions and 17 deletions
+2 -4
View File
@@ -71,12 +71,10 @@ function EventPopover({
const [description, setDescription] = useState(event?.description ?? "");
const [location, setLocation] = useState(event?.location ?? "");
const [start, setStart] = useState(
event?.start
? new Date(event.start).toISOString()
: new Date().toISOString()
event?.start ? event.start : ""
);
const [end, setEnd] = useState(
event?.end ? new Date(event.end)?.toISOString() : new Date().toISOString()
event?.end ? event.end : ""
);
const [calendarid, setCalendarid] = useState(
event?.calId