-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:date-picker): support date-picker placement (#7527)
- Loading branch information
1 parent
d8b26dd
commit a652470
Showing
7 changed files
with
143 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
order: 6 | ||
title: | ||
zh-CN: 自定义位置 | ||
en-US: Placement | ||
--- | ||
|
||
## zh-CN | ||
|
||
可以通过 `nzPlacement` 手动指定弹出的位置。 | ||
|
||
## en-US | ||
|
||
You can manually specify the position of the popup via `nzPlacement`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-date-picker-placement', | ||
template: ` | ||
<nz-radio-group [(ngModel)]="placement"> | ||
<label nz-radio-button nzValue="bottomLeft">bottomLeft</label> | ||
<label nz-radio-button nzValue="bottomRight">bottomRight</label> | ||
<label nz-radio-button nzValue="topLeft">topLeft</label> | ||
<label nz-radio-button nzValue="topRight">topRight</label> | ||
</nz-radio-group> | ||
<br /> | ||
<br /> | ||
<nz-date-picker [nzPlacement]="placement"></nz-date-picker> | ||
<br /> | ||
<nz-range-picker [nzPlacement]="placement"></nz-range-picker> | ||
`, | ||
styles: [ | ||
` | ||
nz-date-picker, | ||
nz-range-picker { | ||
margin: 0 8px 12px 0; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoDatePickerPlacementComponent { | ||
placement: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight' = 'bottomLeft'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters