Angular6 and bootstrap4:日期选择器当前日期选择
Angular 6 and bootstrap 4: date picker current date selection
我有一个包含日期选择器的表单,除了未选择当前日期外,它按预期工作。
当我打开日历时它显示如下
但我需要在打开 .date 选择器时关注当前日期,如下所示
将customTodayClass
添加到bsConfig
并使用css更改日期的背景颜色。
<input type="text"
placeholder="Datepicker"
class="form-control"
bsDatepicker
[bsConfig]="{'customTodayClass': 'today'}"
/>
为 today
添加 CSS class,如下所示。
.today{
background-color: #DCDCDC
}
我有一个包含日期选择器的表单,除了未选择当前日期外,它按预期工作。
当我打开日历时它显示如下
但我需要在打开 .date 选择器时关注当前日期,如下所示
将customTodayClass
添加到bsConfig
并使用css更改日期的背景颜色。
<input type="text"
placeholder="Datepicker"
class="form-control"
bsDatepicker
[bsConfig]="{'customTodayClass': 'today'}"
/>
为 today
添加 CSS class,如下所示。
.today{
background-color: #DCDCDC
}