Skip to content

Issue loading Calendar with multiple tabs #133

@smasterson

Description

@smasterson

I'm finding the calendar does not load correctly if it is positioned on a tab that is not shown first.

New-HTML -Name 'Calendar Load Test' -FilePath "$home\desktop\Calendar01.html" -Show {
    New-HTMLTab -name tab1 {
      New-HTMLText -Text "test"
    }
    New-HTMLtab -name tab2 {
        New-HTMLSection -HeaderText 'Test 2' {
            New-HTMLCalendar {
                New-CalendarEvent -Title 'Active Directory Meeting' -Description 'We will talk about stuff' -StartDate (Get-Date)
                New-CalendarEvent -Title 'Lunch' -StartDate (Get-Date).AddDays(2).AddHours(-3) -EndDate  (Get-Date).AddDays(3) -Description 'Very long lunch'
            }
        }
    }
} -Online

If tab2 loads 'showing/first' it will appear correctly:
image

If tab1 loads 'showing/first' (the usual behavior) and you then switch to tab2, the calendar is not loaded correctly:
image

If you click the month/week/day buttons it will render but the dimensions are a bit off.
I found if you refresh the page while viewing tab2 it will refresh correctly, conversely if you refresh while on tab1 it breaks the calendar on tab2 again.
Tested using Brave/Chrome

Incredible job on this project, thanks a bunch!

Bonus question - is there a way to set the initial view (month/week/day)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions