Skip to content

Commit e6b83eb

Browse files
fix(module:date-picker): remove unsafe style (#8458)
1 parent 24bb1bc commit e6b83eb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/date-picker/date-picker.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export type NzPlacement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
232232
class="ant-picker-wrapper"
233233
[nzNoAnimation]="!!noAnimation?.nzNoAnimation"
234234
[@slideMotion]="'enter'"
235-
style="position: relative;"
235+
[style.position]="'relative'"
236236
>
237237
<ng-container *ngTemplateOutlet="inlineMode"></ng-container>
238238
</div>

components/date-picker/date-range-popup.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { Direction } from '@angular/cdk/bidi';
7-
import { NgTemplateOutlet } from '@angular/common';
7+
import { NgStyle, NgTemplateOutlet } from '@angular/common';
88
import {
99
ChangeDetectionStrategy,
1010
ChangeDetectorRef,
@@ -59,7 +59,7 @@ import { getTimeConfig, isAllowedDate, PREFIX_CLASS } from './util';
5959
template: `
6060
@if (isRange) {
6161
<div class="{{ prefixCls }}-range-wrapper {{ prefixCls }}-date-range-wrapper">
62-
<div class="{{ prefixCls }}-range-arrow" [style]="arrowPosition"></div>
62+
<div class="{{ prefixCls }}-range-arrow" [ngStyle]="arrowPosition"></div>
6363
<div class="{{ prefixCls }}-panel-container {{ showWeek ? prefixCls + '-week-number' : '' }}">
6464
<div class="{{ prefixCls }}-panels">
6565
@if (hasTimePicker) {
@@ -143,7 +143,7 @@ import { getTimeConfig, isAllowedDate, PREFIX_CLASS } from './util';
143143
}
144144
</ng-template>
145145
`,
146-
imports: [InnerPopupComponent, NgTemplateOutlet, CalendarFooterComponent],
146+
imports: [InnerPopupComponent, NgTemplateOutlet, CalendarFooterComponent, NgStyle],
147147
standalone: true
148148
})
149149
export class DateRangePopupComponent implements OnInit, OnChanges, OnDestroy {

0 commit comments

Comments
 (0)