fix: datepicker touchui not displayed correctly #17689
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#17635
What was the issue?
The problem was that the position absolute was not correct. I fixed it by using the p-datepicker-touchui class and only adding it when its actually an touchui datepicker. Otherwise the position: absolute will be used.
Also I added the touchUI back to the showcase. I added a little extra info for usage inside of p-dialog. The [appendto]="'body'" is needed because the overlay-mask is added with zIndex=1103 on the root of body. If the datepicker is not on root of body as well it will be behind the overlay-mask.
Maybe some day I have the time to find a solution that this component is smart enough to know where it should append itself.
PS. I hope the formatting is okay. I ran 'pnpm format'