Skip to content

fix: date remove default max#10007

Open
BF150 wants to merge 2 commits intodevelopfrom
fix/8546-remove-default-max
Open

fix: date remove default max#10007
BF150 wants to merge 2 commits intodevelopfrom
fix/8546-remove-default-max

Conversation

@BF150
Copy link
Copy Markdown
Contributor

@BF150 BF150 commented Apr 15, 2026

No description provided.

@BF150 BF150 self-assigned this Apr 15, 2026
@BF150 BF150 added the v4 label Apr 15, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the InputDateController by removing the DEFAULT_MAX_DATE constant and the logic that defaulted to it within validateMax. The feedback recommends updating the validateMax method signature to explicitly include null to maintain type safety and consistency now that values are passed directly to the validation function.

Comment on lines 153 to +154
public validateMax(value?: Iso8601 | Date): void {
const ensuredValue =
(value === undefined || value === null) &&
(this.component._type === 'date' || this.component._type === 'month' || this.component._type === 'datetime-local')
? InputDateController.DEFAULT_MAX_DATE
: value;

this.validateIso8601('_max', ensuredValue);
this.validateIso8601('_max', value);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The validateMax method signature should be updated to include null (i.e., value?: Iso8601 | Date | null). Since the internal null-check and default value assignment have been removed, null values are now passed directly to validateIso8601. Updating the signature ensures consistency with validateValue and correctly reflects that null is a valid input for unsetting the maximum date in TypeScript.

Suggested change
public validateMax(value?: Iso8601 | Date): void {
const ensuredValue =
(value === undefined || value === null) &&
(this.component._type === 'date' || this.component._type === 'month' || this.component._type === 'datetime-local')
? InputDateController.DEFAULT_MAX_DATE
: value;
this.validateIso8601('_max', ensuredValue);
this.validateIso8601('_max', value);
public validateMax(value?: Iso8601 | Date | null): void {
this.validateIso8601('_max', value);

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

🚀 MCP preview deployed to Vercel: https://kolibri-ljlh7njkq-public-ui-kolibri-mcp.vercel.app

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

@BF150 BF150 marked this pull request as ready for review April 16, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug: Ungewolltes Verhalten bei Datumseingabe ohne expliziten Max-Wert – Barrierefreiheit eingeschränkt

1 participant