Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tedi/components/form/date-picker/date-picker.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
size="small"
class="tedi-date-picker__clear"
[iconSize]="18"
[attr.aria-label]="translationService.track('date-picker.clear-date')()"
[ariaLabel]="'date-picker.clear-date' | tediTranslate"
[disabled]="inputDisabled()"
(click)="clearInput()"
></button>
Expand All @@ -46,9 +46,7 @@
variant="neutral"
size="small"
class="tedi-date-picker__toggle"
[attr.aria-label]="
translationService.track('date-picker.open-calendar')()
"
[attr.aria-label]="'date-picker.open-calendar' | tediTranslate"
[disabled]="inputDisabled()"
(click)="openCalendar()"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { NgxFloatUiContentComponent } from "ngx-float-ui";
import { DatePickerCalendarGridComponent } from "./date-picker-calendar-grid/date-picker-calendar-grid.component";

class TranslationMock {
translate(key: string) {
return key;
}

track(key: string) {
return () => key;
}
Expand Down
6 changes: 2 additions & 4 deletions tedi/components/form/date-picker/date-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
computed,
model,
input,
inject,
signal,
OnInit,
viewChild,
Expand All @@ -15,7 +14,6 @@ import {
import { ButtonComponent } from "../../buttons/button/button.component";
import { ClosingButtonComponent } from "../../buttons/closing-button/closing-button.component";
import { IconComponent } from "../../base/icon/icon.component";
import { TediTranslationService } from "../../../services/translation/translation.service";
import { SeparatorComponent } from "../../helpers/separator/separator.component";
import { PopoverComponent } from "../../overlay/popover/popover.component";
import { PopoverContentComponent } from "../../overlay/popover/popover-content/popover-content.component";
Expand All @@ -25,6 +23,7 @@ import { DatePickerCalendarGridComponent } from "./date-picker-calendar-grid/dat
import { DatePickerMonthGridComponent } from "./date-picker-month-grid/date-picker-month-grid.component";
import { DatePickerYearGridComponent } from "./date-picker-year-grid/date-picker-year-grid.component";
import { formatDate, parseDate, isSameDay, isBeforeDay, isAfterDay, getISOWeek } from "../../../utils/date.util";
import { TediTranslationPipe } from "../../../services/translation/translation.pipe";

export interface DatePickerDay {
date: Date;
Expand Down Expand Up @@ -66,6 +65,7 @@ let datePickerId = 0;
DatePickerCalendarGridComponent,
DatePickerMonthGridComponent,
DatePickerYearGridComponent,
TediTranslationPipe
],
})
export class DatePickerComponent implements OnInit {
Expand Down Expand Up @@ -271,8 +271,6 @@ export class DatePickerComponent implements OnInit {
readonly calendarGrid = viewChild<DatePickerCalendarGridComponent>("gridElement");
readonly popover = viewChild.required(PopoverComponent);

readonly translationService = inject(TediTranslationService);

constructor() {
effect(() => {
const selected = this.selected();
Expand Down