Skip to content

Commit

Permalink
fix: little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Feb 17, 2020
1 parent 45ba56f commit 1b94e81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/calendar/src/lib/calendar/month.component.ts
Expand Up @@ -265,8 +265,10 @@ export class MonthComponent implements OnInit, OnChanges {
if (!date) {
this.date = this.selectSpan ? this.selectSpan[1].clone() : moment();
}
this.formatted = this.date.format(this.monthFormat);
this.cells = this.getMonth(this.date.clone(), 'current');
setTimeout(() => {
this.formatted = this.date.format(this.monthFormat);
this.cells = this.getMonth(this.date.clone(), 'current');
});
}

/** Selects the day of the given moment. */
Expand Down
Expand Up @@ -119,7 +119,7 @@ export class EntryActionbarComponent extends ActionbarComponent implements OnIni
if (!value) {
value = [];
}
this.selection.replaceWith(value.map((liteEntry) => new Item(this.getEntryAction(liteEntry), this.config)));
this.selection?.replaceWith(value.map((liteEntry) => new Item(this.getEntryAction(liteEntry), this.config)));
}

filterDropdownList(listComponent: ListComponent<any>, query) {
Expand Down
7 changes: 4 additions & 3 deletions src/app/form/datetime-demo.component.ts
Expand Up @@ -10,16 +10,17 @@ import moment from 'moment-es6';
<h2>Calendar: {{ calendar.value }}</h2>
<p>controls + month grid inside</p>
<ec-calendar #calendar></ec-calendar>
<h2>Month Heatmap</h2>
<ec-heatmap [selectSpan]="selectSpan" [date]="myDate"
[disableDrag]="false" [disableDragAnywhere]="true" (spanChanged)="changedSpan($event)" [timestamps]="timestamps"></ec-heatmap>
<button (click)="changeMonth()">change month</button>
<h2>Month</h2>
<p>Just month grid</p>
<ec-month #month></ec-month>
{{ month.date }}
`,
})
/*
<h2>Month Heatmap</h2>
<ec-heatmap [selectSpan]="selectSpan" [date]="myDate"
[disableDrag]="false" [disableDragAnywhere]="true" (spanChanged)="changedSpan($event)" [timestamps]="timestamps"></ec-heatmap> */
export class DatetimeDemoComponent {
timestamps;
myDate;
Expand Down

0 comments on commit 1b94e81

Please sign in to comment.