nhn / toast-ui.react-calendar

TOAST UI Calendar wrapper for React.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong definition

Harasz opened this issue · comments

Version

1.0.5

Test Environment

Chrome last version, Windows 10, TypeScript

Current Behavior

I noticed a problem with the types of events. It returns what is written in the documentation, but there is something completely different in the definition files. In the definition files it should return ISchedule, but it return:

{
isAllDay: true
start: TZDate {_date: Mon Jan 27 2020 00:00:00 GMT+0100 (czas środkowoeuropejski standardowy)}
end: TZDate {_date: Tue Jan 28 2020 23:59:59 GMT+0100 (czas środkowoeuropejski standardowy)}
guide: MonthGuide
options: {top: 0, height: "100%", bgColor: "#f7ca88", label: "New event", isResizeMode: false,}
view: Month {__fe_id: 51, id: 51, container: div.tui-full-calendar-month.tui-view-51.tui-view-52.tui-full-calendar-vlayout-container, children: Collection, parent: Layout,}
weeks: (6) [WeekdayInMonth, WeekdayInMonth, WeekdayInMonth, WeekdayInMonth, WeekdayInMonth, WeekdayInMonth]
days: 7
ratio: ƒ ()
startCoord: (2) [0, 0]
guideElements: {0: div.tui-full-calendar-month-guide-block}
grids: (7) [{}, {}, {}, {}, {}, {}, {}]
__proto__: Object
triggerEventName: undefined
__proto__: Object
}

Expected Behavior

Should return type as it in https://nhn.github.io/tui.calendar/latest/Calendar#event-beforeCreateSchedule

@Harasz
Can you know the specific reproduction situation?
You can give a link like this:
https://codesandbox.io/s/toast-uireact-calendar-82fi9