Implement comprehensive calendar UX improvements
- Add time range display to week view events showing "start - end" format - Optimize time display with smart AM/PM formatting to reduce redundancy - Fix context menu overlap by adding stop_propagation to event handlers - Implement persistent view mode (Month/Week) across page refreshes using localStorage - Replace month-based tracking with intelligent selected date tracking - Add day selection in month view with visual feedback and click handlers - Fix view switching to navigate to week containing selected day, not first week of month - Separate selected_date from display_date for proper context switching - Simplify week view header to show "Month Year" instead of "Week of Month Day" - Add backward compatibility for existing localStorage keys Greatly improves calendar navigation and user experience with persistent state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -14,14 +14,7 @@ pub struct CalendarHeaderProps {
|
||||
|
||||
#[function_component(CalendarHeader)]
|
||||
pub fn calendar_header(props: &CalendarHeaderProps) -> Html {
|
||||
let title = match props.view_mode {
|
||||
ViewMode::Month => {
|
||||
format!("{} {}", get_month_name(props.current_date.month()), props.current_date.year())
|
||||
},
|
||||
ViewMode::Week => {
|
||||
format!("Week of {} {}", get_month_name(props.current_date.month()), props.current_date.day())
|
||||
},
|
||||
};
|
||||
let title = format!("{} {}", get_month_name(props.current_date.month()), props.current_date.year());
|
||||
|
||||
html! {
|
||||
<div class="calendar-header">
|
||||
|
||||
Reference in New Issue
Block a user