Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static position datepicker #2728

Closed
Halomaple opened this issue Jan 2, 2019 · 5 comments
Closed

Static position datepicker #2728

Halomaple opened this issue Jan 2, 2019 · 5 comments
Assignees
Milestone

Comments

@Halomaple
Copy link

Halomaple commented Jan 2, 2019

What problem does this feature solve?

Current the popup datepicker works very well but user some time needs a already open datepicker to quickly select a date. It can be achieved by using nzOpen=true but the position of opened datepicker is absolute and it is placed under the 'cdk-overlay-connected-position-bounding-box' which cover the whole view portal.

So the tricky thing is: when the layout or offset of the 'fake' container where the orginal is placed in is changed, the datepicker will overflow cause the left or top of its absolute position is not changed.

If ng-zorro-antd can provide static opened datepicker, that would be much nicer. Static and opened datepicker is helpful for date selection.

Thanks.

What does the proposed API look like?

Add a new nzStatic of type boolean default to false. When it is true, use position: static for the datepicker and place it under the original container (where the <nz-date-picker></nz-date-picker> is locating at).

@wilsoncook
Copy link
Member

@Halomaple Would match your requirements?

@krokofant
Copy link
Contributor

@wilsoncook What do you mean?

@Halomaple
Copy link
Author

@wilsoncook I think the datepicker should offer a option to use position:static so that it will stay inside the container.

@theadley
Copy link

theadley commented Apr 17, 2020

This could also lead to another useful API entry for nzInline which could hide the input field and instead show an inline, open date/month/range/week picker.

Edit (20/04/2020): Or you can use the calendar component in a card - really useful and easily missed (sorry about that).

@hsuanxyz hsuanxyz assigned wenqi73 and unassigned wilsoncook Oct 22, 2020
@hsuanxyz hsuanxyz added this to the backlog milestone Oct 22, 2020
@wzhudev
Copy link
Member

wzhudev commented Oct 16, 2021

I belive that this feature is already implemented in a previous PR #6436.

@wzhudev wzhudev closed this as completed Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants