我對p日曆的語言環境有同樣的問題。我搬到firstDayOfWeek: 1
到數組的末端,它的工作:
this.nl = {
dayNames: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
dayNamesShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"],
dayNamesMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"],
monthNames: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
firstDayOfWeek: 1
};
這是我的html:
<p-calendar id="entityActiveSince" [showIcon]="true" [locale]="nl"
dateFormat="dd-mm-yy" [readonlyInput]="true" [disabled]="saving"
[(ngModel)]="entity.ActiveSince" [monthNavigator]="true"
[yearNavigator]="true" yearRange="1990:2020" name="activeSince"></p-calendar>
可能在這裏跳了槍(因此dele現在至少應該回答)但是試着用'firstDayOfWeek',如果可以的話,即使它看起來* firstDay是正確的。永遠不會傷害嘗試壽:D – Alex
我用firstDayOfWeek取代第一天,它仍然無法正常工作。 – Brett