Skip to content

Bug: Code in the main branch doesn't show today's data #14

@Maples7

Description

@Maples7

When there's data like Date(): ACData(date: Date(), count: 5), It's blank for today's grid.

Also, the first week doesn't show correctly. While today is Tuesday, it shouldn't show the complete week with 7 days. There should be only 3 grids instead of 7, under the situation that Sunday is the first weekday.

Reproduce:
When the preview code is like this:

struct ACGridStack_Previews: PreviewProvider {
    static var previews: some View {
        AxisContribution(
            constant: .init(),
            source: [
                Date(): ACData(date: Date(), count: 5)
            ]
        )
        .padding()
    }
}

This is the result:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions