Angular_ngx bootstrap locale

版权声明:本文为Martin原创文章,未经Martin允许不得转载。 https://blog.csdn.net/qq_36279445/article/details/82807252

在使用 Datepicker 组件中用到了Locales 

使用方法

module

import { BsLocaleService, zhCnLocale, defineLocale } from 'ngx-bootstrap';

defineLocale('zhcn', zhCnLocale);
  constructor(
    private garbageServices: GarbageCollectionService,
    private toastr: ToastrService,
    private localeService: BsLocaleService) {
      this.localeService.use('zhcn'); }

zhcn 必须小写。

猜你喜欢

转载自blog.csdn.net/qq_36279445/article/details/82807252