question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Static position datepicker

See original GitHub issue

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 <nz-date-picker></nz-date-picker> 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).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
theadleycommented, Apr 20, 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).

0reactions
hulliscommented, Oct 16, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to control positioning of jQueryUI datepicker
The solution to this issue ("datepicker input nested within a modal") is to instead calculate the vertical positioning of the input relative to ......
Read more >
JQuery UI 1.12 Datepicker wrong position issue (and fix)
In some scenario, when the page is scrolled down, the Datepicker will appear in wrong position. It's due to the scroll distance not...
Read more >
Datepicker positioning in Chrome inside Fixed element when ...
I've got a very specific bug that only happens when I have a datepicker in a position: fixed element and the html font-size...
Read more >
8223 (Datepicker: position remains fixed on scrolling) - jQuery UI
I have a jquery datepicker in my application. On scrolling the calander ui position remains fixed on the screen. Oldest first. Newest first...
Read more >
Date picker position set to static rather than absolute - gitlab-ui
By default Pikaday sets the position of its calendar popup to be position: absolute however, inexplicably, the date picker components sets ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found