Skip to content

Allow fixed size day cells in Calendar #646

@angryPodo

Description

@angryPodo

Feature

Currently, Calendar forces day cells to fill the width evenly using Modifier.weight(1f). This makes it difficult to implement designs requiring fixed-size day cells (e.g., small circles with custom spacing), as the touch area and selection background stretch unintentionally.

I propose adding an option to disable this forced weight distribution. Ideally, we could choose between the current "Fill" behavior and a "Fixed" behavior where we can define a specific size (Dp) and arrangement for the days.

Tech (if applicable)

I've checked the implementation in CalendarMonths.kt. We could introduce a configuration interface (e.g., DaySize) with Fill (default) and Fixed options.

If Fixed is selected, we would use Modifier.size(...) instead of weight(1f) and apply the user's Arrangement to the Row.

I am willing to implement this and submit a PR!

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