A modern, elegant time selection interface with circular wheels for hours and minutes.
- Intuitive circular wheel interface for selecting hours (0-6) and minutes (in 15-minute increments)
- Clean, flat design with minimal aesthetics
- Touch and mouse gesture support for rotating the wheels
- Responsive layout that works on both desktop and mobile devices
- Real-time display of the selected time in a readable format
- Rotate or click on the hour wheel (left) to select hours from 0 to 6
- Rotate or click on the minute wheel (right) to select minutes in 15-minute increments (00, 15, 30, 45)
- The selected time appears in the input field below the wheels
- Click "Submit" to confirm your selection
The time selector is built using vanilla JavaScript and CSS, with no external dependencies. Key technical features include:
- CSS variables for easy theming
- Circular positioning calculations for wheel items
- Touch and mouse event handling for intuitive rotation
- Smooth transitions and subtle animations for better user experience
You can easily customize the appearance by modifying the CSS variables in the :root selector:
:root {
--primary-color: #2563eb;
--primary-light: #60a5fa;
--primary-dark: #1d4ed8;
--background: #f8fafc;
--surface: #ffffff;
--on-primary: #ffffff;
--on-surface: #0f172a;
--border: #e2e8f0;
--shadow: rgba(0, 0, 0, 0.04);
}
The time selector works in all modern browsers that support ES6 JavaScript and modern CSS features:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
MIT License
A lightweight, browser-based calendar application with a time-grid view that allows users to create, edit, move, and resize events with 15-minute precision.
- Working Hours View: Calendar grid displays time slots from 8:00 AM to 8:00 PM
- 15-Minute Time Increments: Precise scheduling with visual indicators for each quarter hour
- Event Management:
- Create events with title, date, start/end times, description, and color
- Edit existing events
- Delete events
- Move events between days via drag-and-drop
- Resize events by dragging handles (change start or end time)
- Data Persistence: All events are saved to localStorage
- Intuitive Navigation: Easily navigate between weeks
- Visual Cues:
- Highlights for today's date and current time
- Color-coding for events
- Visual distinction between different 15-minute increments
- Open the
calendar.htmlfile in any modern web browser - The calendar will display the current week by default
- Events are automatically loaded from localStorage if previously saved
- Previous Week: Click the "Previous Week" button
- Next Week: Click the "Next Week" button
- This Week: Click the "This Week" button to return to the current week
- Reload Events: Click the "Reload Events" button to manually refresh events from localStorage
- Click on any time slot in the calendar grid
- Fill in the event details in the modal:
- Title (required)
- Date (pre-filled)
- Start Time (pre-filled based on clicked time slot)
- End Time (defaults to 30 minutes after start time)
- Description (optional)
- Color (choose from available options)
- Click "Save" to create the event
- Hover over an event to see the move cursor
- Click and drag the event:
- Drag vertically to change the time while keeping it on the same day
- Drag horizontally to move it to a different day
- Drag diagonally to change both day and time
- Release the mouse button to confirm the new position
- Hover over the top or bottom edge of an event to see the resize cursor
- Click and drag:
- Drag the top handle to change the start time
- Drag the bottom handle to change the end time
- Events will snap to 15-minute increments
- Release the mouse button to confirm the new size
- Click on an event to open its details
- Click the "Edit" button to modify the event
- Update the details in the modal
- Click "Save" to apply changes
- Click on an event to open its details
- Click the "Edit" button
- Click the "Delete" button in the edit modal
- Confirm the deletion when prompted
- Pure JavaScript: No external libraries or frameworks required
- LocalStorage: All events are saved to the browser's localStorage
- Responsive Design: Works on various screen sizes
- Working Hours: Calendar displays from 8:00 AM to 8:00 PM by default (configurable)
- 15-Minute Precision: All time calculations snap to 15-minute increments
- Events outside working hours (8 AM - 8 PM) will not be displayed on the grid but remain in storage
- The calendar automatically adjusts for events crossing hour boundaries
- Minimum event duration is 15 minutes
- All events snap to 15-minute increments when being created, moved, or resized
