Skip to content

feat(filter-bar): add date and time limits to date and datetime pipes (#DS-5315)#1775

Open
lskramarov wants to merge 1 commit into
mainfrom
feat/DS-5315
Open

feat(filter-bar): add date and time limits to date and datetime pipes (#DS-5315)#1775
lskramarov wants to merge 1 commit into
mainfrom
feat/DS-5315

Conversation

@lskramarov

Copy link
Copy Markdown
Contributor

No description provided.

@lskramarov lskramarov self-assigned this Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 3025c82):

https://koobiq-next--prs-1775-9jctcqa0.web.app

(expires Mon, 27 Jul 2026 11:41:00 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@lskramarov
lskramarov marked this pull request as draft July 23, 2026 12:33
@lskramarov
lskramarov marked this pull request as ready for review July 24, 2026 11:43
@artembelik
artembelik requested a review from Copilot July 24, 2026 13:38

Copilot AI left a comment

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.

Pull request overview

Adds configurable min/max selectable bounds and min/max interval constraints to the filter-bar date and datetime pipes, including localized error hints and documentation/example updates to demonstrate the new template options.

Changes:

  • Extend KbqPipeTemplate with minDateTime/maxDateTime and minInterval/maxInterval options and wire them into the date/datetime pipe editors.
  • Add interval validation + localized hint rendering for “too short/too long” custom periods, plus bound-aware min/max inputs/calendars/timepickers.
  • Update docs, docs examples, and locale bundles; refresh public API snapshots.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/public_api_guard/components/filter-bar.api.md Public API snapshot updates for new template fields and new pipe component members.
tools/public_api_guard/components/core.api.md Public API snapshot updates for new locale keys.
packages/docs-examples/components/filter-bar/index.ts Registers the new date-limits docs example.
packages/docs-examples/components/filter-bar/filter-bar-date-limits/filter-bar-date-limits-example.ts New example demonstrating min/max datetime bounds and interval constraints.
packages/components/filter-bar/pipes/pipe-datetime.ts Implements usesTime() for datetime pipe behavior differences.
packages/components/filter-bar/pipes/pipe-datetime.spec.ts Adds unit tests covering bounds, interval validation, and hint rendering for datetime pipe.
packages/components/filter-bar/pipes/pipe-datetime.html Binds min/max to date/time inputs and adds interval hint rendering for datetime editor UI.
packages/components/filter-bar/pipes/pipe-date.ts Implements usesTime() for date pipe behavior differences.
packages/components/filter-bar/pipes/pipe-date.spec.ts Adds unit tests covering bounds, interval validation, and hint rendering for date pipe.
packages/components/filter-bar/pipes/pipe-date.html Binds min/max to date inputs/calendars and adds interval hint rendering for date editor UI.
packages/components/filter-bar/pipes/pipe-date-base.ts Core implementation: template-driven bounds + interval parsing/validation + default range reconciliation + startMax.
packages/components/filter-bar/filter-bar.types.ts Extends KbqPipeTemplate with the new public configuration options and docs.
packages/components/filter-bar/filter-bar.ru.md Documents new date/time limits feature in Russian and adds example reference.
packages/components/filter-bar/filter-bar.en.md Documents new date/time limits feature in English and adds example reference.
packages/components/core/locales/tk-TM.ts Adds localized strings for interval-too-short/too-long hints.
packages/components/core/locales/ru-RU.ts Adds localized strings for interval-too-short/too-long hints.
packages/components/core/locales/pt-BR.ts Adds localized strings for interval-too-short/too-long hints.
packages/components/core/locales/es-LA.ts Adds localized strings for interval-too-short/too-long hints.
packages/components/core/locales/en-US.ts Adds localized strings for interval-too-short/too-long hints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +122 to +125
private toValidInterval(value: unknown): any {
if (value == null || typeof value !== 'object' || Array.isArray(value)) return undefined;

try {
Comment on lines +99 to 102
@if (formGroup.controls.start.invalid || formGroup.controls.end.invalid) {
<kbq-hint class="kbq-date-period__hint" [color]="'error'">
{{ localeData.datePipe.customPeriodErrorHint }}
</kbq-hint>
Comment on lines +125 to 128
@if (formGroup.controls.start.invalid || formGroup.controls.end.invalid) {
<kbq-hint class="kbq-date-period__hint" [color]="'error'">
{{ localeData.datePipe.customPeriodErrorHint }}
</kbq-hint>
// template is momentarily absent must not blank out previously resolved bounds.
if (!template) return;

const min = template.minDateTime != null ? this.toValidDate(template.minDateTime) : undefined;

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.

Предлагаю чуть дописать логику и обернуть в метод

Suggested change
const min = template.minDateTime != null ? this.toValidDate(template.minDateTime) : undefined;
const min = this.toValidDate(template.minDateTime);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants