damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20220204-PositioningIonicPopovers.html #130

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20220204-PositioningIonicPopovers.html

damirarh commented 1 year ago

Imported comment written by Andre SUD on 2022-03-13T01:42:05

It works on the first time, second time that you click the css is ignored

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2022-03-13T09:25:50

Good catch. For some reason the CSS class set on the popover element gets lost when the popover is closed the first time. This doesn't happen to the id, so you can use that instead in your CSS selector or find some other way to apply the style to the popover element reliably.

I haven't tested it, but the CSS class should also be consistently set when opening the popover from code using PopoverController and setting the cssClass option there.

I updated the sample code and blogpost using id instead of class in the CSS selector.

hareshwar1702 commented 11 months ago

Adding this attribute will fix this issue of calendar cuts and appearing off the screen. Please try this in ion-popover => keep-contents-mounted=“true”. <ion-popover class="popoverDatetime" trigger="open-date-input" keep-contents-mounted="true" show-backdrop="false" [dismissOnSelect]="true" side="top" alignment="start" size="cover" > <ion-datetime #popoverDatetime presentation="date" [max]="maxDate" (ionChange)="targetDate = popoverDatetime.value;">