我正在使用 ngx-bootstrap datepicker,它具有 daypicker、monthpicker 和 yearpicker 作为内部组件。我想将 css 应用于 daypicker 中存在的表。
<custom-datepicker>
<datepicker> //ngx-bootstrap datepicker component
<daypicker>
<table>
//rows, want to apply some css to only this table
</table>
</daypicker>
<monthpicker>
<table>
//rows
</table>
</monthpicker>
<yearpicker>
<table>
//rows
</table>
</yearpicker>
</datepicker>
</customdatepicker>
CustomDatePickerComponent.ts
@Component({
selector: 'custom-datepicker',
templateUrl: 'custom-datepicker-component.html',
styleUrls: ['custom-datepicker-component.scss'],
})
export class CustomDatePickerComponent {
}
自定义日期选择器组件.html
<datepicker></datepicker>
自定义日期选择器组件.scss
//I want to apply this css to a table which is inside daypicker. As of now it's applying to all the tables
table {
border: 1px solid lightgrey;
}