![](/img/trans.png)
[英]How can I remove days from another month using UI-Calendar from UI-AngularJS?
[英]How do I set the default month for the angular-ui/ui-calendar for AngularJS(ver 1)? By default, it sets it to the current month
閱讀了全部日歷文檔后,我認為可以在$ scope.uiConfig中的日歷中設置一個month屬性,如下所示。 但是我不明白我在哪里設置了month屬性。
$scope.uiConfig = {
calendar: {
firstDay:1,
month: 0,
year: 2018,
height: 220,
aspectRatio: 1.09,
editable: true,
header:{
left: 'title',
center: '',
right: ''
},
eventClick: $scope.alertOnEventClick,
eventDrop: $scope.alertOnDrop,
eventResize: $scope.alertOnResize,
eventRender: $scope.eventRender,
month: 3
}
};
解決了該問題。 我使用屬性“ defaultDate”而不是“ month”。 已根據此處的完整日歷文檔進行了更新。 它接受任何時刻的日期。 例如:
$scope.uiConfig = {
calendar:{
defaultDate: "2018-10-01"
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.