You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
580 B
TypeScript
22 lines
580 B
TypeScript
export class TimeSlot {
|
|
constructor(isoTime: string, startDate: string, end: string) {
|
|
this.isoTime = isoTime;
|
|
this.start = startDate;
|
|
this.end = end;
|
|
this.allDay = true;
|
|
this.draggable = false;
|
|
}
|
|
|
|
public eventTimeLabel() {
|
|
return new Date(this.end).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
|
|
}
|
|
// event time in iso format
|
|
isoTime: string;
|
|
// start of event day
|
|
start: string;
|
|
// event date time
|
|
end: string;
|
|
allDay: boolean;
|
|
draggable: boolean;
|
|
}
|