DynamicDialog does not inherit template styles from Ultima.

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
JaredCaldas
Posts: 1
Joined: 19 Apr 2017, 22:31

22 Jun 2021, 18:47

This is the code.

Code: Select all

	showRegisterDialog() {
		this.refRegisterDialog = this.dialogService.open(AppRegisterItemDialog, {
			header: 'Register ítem',
			width: '70%',
			contentStyle: {'min-height': '550px'},			
			baseZIndex: 10000
		});
		this.refRegisterDialog.onClose.subscribe((parItem: any) =>{
			if (parItem) {
				console.log('parItem:', parItem);
			}
		});
	}
AppRegisterItemDialog

Code: Select all

import { Component } from '@angular/core';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';

@Component({
	templateUrl: './app.register-item.dialog.html',
})
export class AppRegisterItemDialog {
	constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig) { }
	ngOnInit() {}
	save(){
		this.ref.close('completed!');
	}
	cancel(){
		this.ref.close('cancelled!');
	}
}

Html

Code: Select all

<div class="p-dialog-content">
	<div class="p-formgrid p-grid">
		<div class="p-field p-col-12">
			<label>Name</label>
			<input type="text" pInputText inputId="name"/>
		</div>
		<div class="p-field p-col-12">
			<label>Birthday</label>
			<p-calendar [showIcon]="true" inputId="birthDay"></p-calendar>
		</div>        
	</div>
</div>
<div class="p-dialog-footer">
	<button pButton pRipple label="Cancel" (click)="cancel()"></button>
	<button pButton pRipple label="Save" (click)="save()"></button>
</div>
Result
https://drive.google.com/file/d/1EMUEg2 ... sp=sharing

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

26 Jun 2021, 23:03

Hi,
Did you try using appendTo prop for calendar component? You can see detail documentation topic in calender demo page (https://primefaces.org/primeng/showcase/#/calendar)

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests