Skip to content

Commit

Permalink
Add day labels to date picker
Browse files Browse the repository at this point in the history
Set the `weekdays` value to true in the ngb-datepicker component, and
remove the config in the NgbDatePickerConfig service that removes them
by default.

PER-9585: Add day labels to date calendar
  • Loading branch information
meisekimiu committed Jun 14, 2024
1 parent 406008c commit 1040fb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@
<ng-container *ngIf="!dateOnly">
{{
displayValue
? (displayValue | prDate : item?.TimezoneVO)
? (displayValue | prDate: item?.TimezoneVO)
: (!canEdit ? readOnlyEmptyMessage : emptyMessage) || '&nbsp;'
}}
</ng-container>
<ng-container *ngIf="dateOnly">
{{
displayValue
? (displayValue | date : 'yyyy-MM-dd' : '+0000')
? (displayValue | date: 'yyyy-MM-dd' : '+0000')
: (!canEdit ? readOnlyEmptyMessage : emptyMessage) || '&nbsp;'
}}
</ng-container>
Expand All @@ -222,6 +222,7 @@
[startDate]="ngbDate"
[hidden]="!isEditing"
[maxDate]="maxNgbDate"
[weekdays]="true"
(dateSelect)="onDateChange($event)"
[footerTemplate]="!dateOnly ? timePicker : null"
></ngb-datepicker>
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export class SharedModule {
library.addIcons(faFileArchive, faPenSquare);
this.dialog.registerComponents(this.dialogComponents, this.resolver, true);

this.datePickerConfig.weekdays = false;
this.datePickerConfig.minDate = {
year: 1,
day: 1,
Expand Down

0 comments on commit 1040fb0

Please sign in to comment.