Katkat

Build a Weekly Calendar

RobinhoodFrontend Engineer · Onsite

Last updated

This question evaluates frontend UI engineering skills, focusing on interactive interface construction, event handling, and state modeling to maintain a single source of truth for events in a weekly calendar grid, and it belongs to the web frontend development and UI/state-management domain.

Implement an interactive weekly calendar UI.

Requirements:

  • Display a one-week calendar with 7 days.
  • The calendar should be divided into 1-hour time slots.
  • Each visible cell represents a specific day and hour.
  • When the user clicks a cell, open a dialog that allows the user to enter an event name.
  • After the user submits the dialog, show the event in the corresponding calendar cell.
  • The implementation should manage state cleanly and avoid having multiple conflicting sources of truth. For example, store the canonical event data and derive any grid representation from it as needed.

Assume a mockup is provided during the interview. Focus on building the core interaction and state model.