I was finally able to get primeNG working with angular-cli. In `.angular-cli.json I have:
"styles": [
"../node_modules/primeng/resources/themes/omega/theme.css",
"../node_modules/primeng/resources/primeng.css",
"styles.css"
],
I am trying to use the CalendarModule like so:
import {CalendarModule} from "primeng/primeng";
@NgModule({
imports: [
CalendarModule
],
In the HTML I have the following:
<p-calendar styleClass="test" [(ngModel)]="validationDate"
inputStyleClass="test" [showIcon]="true" dateFormat="dd.mm.yy"></pcalendar>
In the component css
@Component({
selector: 'user-validation',
templateUrl: 'user-validation.component.html',
styleUrls: ['user-validation.component.css']
})
user-validation.component.css
.test{
width: 25px;
}
try
/deep/ .test{
width: 25px !important;
}
or
>>> .test{
width: 25px !important;
}
This worked for me -
<p-calendar name = "calendarMod" [showIcon]="true" [(ngModel)]="actionDate" dateFormat="mm/dd/yy" [inputStyle] = "{'width':'85px'}" ></p-calendar>