Skip to content

Commit

Permalink
Merge pull request #19736 from abpframework/ng/add-second-to-adapter
Browse files Browse the repository at this point in the history
Add second arg to formatDate method in time.adapter
  • Loading branch information
sumeyyeKurtulus authored May 7, 2024
2 parents 7346f1b + 2f4974d commit 881d921
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
class="form-control"
/>
}

@case ('hidden') {
<input [formControlName]="prop.name" type="hidden" />
}

@case ('checkbox') {
<div class="form-check" validationTarget>
<input
Expand All @@ -42,7 +40,6 @@
></ng-template>
</div>
}

@case ('select') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<select
Expand All @@ -59,7 +56,6 @@
}
</select>
}

@case ('multiselect') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<select
Expand All @@ -77,7 +73,6 @@
}
</select>
}

@case ('typeahead') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<div #typeahead class="position-relative" validationStyle validationTarget>
Expand All @@ -100,7 +95,6 @@
<input [formControlName]="prop.name" type="hidden" />
</div>
}

@case ('date') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<input
Expand All @@ -118,12 +112,10 @@
<ng-template [ngTemplateOutlet]="label"></ng-template>
<ngb-timepicker [formControlName]="prop.name"></ngb-timepicker>
}

@case ('dateTime') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<abp-extensible-date-time-picker [prop]="prop" [meridian]="meridian$ | async" />
}

@case ('textarea') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<textarea
Expand All @@ -135,7 +127,6 @@
class="form-control"
></textarea>
}

@case ('passwordinputgroup') {
<ng-template [ngTemplateOutlet]="label"></ng-template>
<div class="input-group form-group" validationTarget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TimeAdapter extends NgbTimeAdapter<string | Date> {
if (!value) return '';

const date = new Date(0, 0, 1, value.hour, value.minute, value.second);
const formattedDate = formatDate(date, 'HH:mm', 'en');
const formattedDate = formatDate(date, 'HH:mm:ss', 'en');

return formattedDate;
}
Expand Down

0 comments on commit 881d921

Please sign in to comment.