Closed fishen closed 7 years ago
add local setting above AppComponent can fix this issue.
declare var moment: any;
moment.locale('zh-cn');
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent implements OnInit {
I have already added script moment-with-locales to my app(ng4) , and set language to 'zh-cn' in the AppComponent, but it still dosen't work. package.json:
"@ngui/datetime-picker": "^0.16.1"
.angular-cli.json:app.component.ts:
template :
<input [(ngModel)]="model" ngui-datetime-picker date-only="true" />
navigator's console output :page result(still English...):![default](https://cloud.githubusercontent.com/assets/17705466/25084757/d77fafe8-2390-11e7-8af1-50bd56485af7.PNG)
The example in the https://plnkr.co/edit/J6hXyB?p=preview works properly.