nhn / toast-ui.react-calendar

TOAST UI Calendar wrapper for React.js
MIT License
168 stars 43 forks source link

Wrong definition #27

Open Harasz opened 4 years ago

Harasz commented 4 years ago

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

jungeun-cho commented 4 years ago

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