Skip to content

Commit

Permalink
Do not use custom title
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinschopf committed Mar 7, 2021
1 parent 962da59 commit defa363
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,9 @@ class Hours extends React.Component<Props> {
select={(selectionInfo: DateSelectArg) => {
console.debug(selectionInfo);
let title: string = "";
if (
selectionInfo.start.getDay() ===
selectionInfo.end.getDay()
) {
title = `${selectionInfo.start.getHours()}:${selectionInfo.start.getMinutes()} - ${selectionInfo.end.getHours()}:${selectionInfo.end.getMinutes()}`;
} else {
title = `${mapDayToName(
mapDateDayToRealDay(
selectionInfo.start.getDay()
)
)} ${selectionInfo.start.getHours()}:${selectionInfo.start.getMinutes()} - ${mapDayToName(
mapDateDayToRealDay(selectionInfo.end.getDay())
)} ${selectionInfo.end.getHours()}:${selectionInfo.end.getMinutes()}`;
}
this.calendarRef.current.getApi().addEvent({
start: selectionInfo.start,
end: selectionInfo.end,
title: title,
});
}}
locale={this.props.locale ? this.props.locale : "en"}
Expand Down

0 comments on commit defa363

Please sign in to comment.