-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tui-calendar.js:3512 Uncaught TypeError: Cannot read property 'split' of undefined #150
Comments
Need call stack or reproduce steps. Can I get this information? |
@dongsik-yoo you mean this |
Yes. I'll check that. |
I think you wouldn't create a |
|
I mean you shouldn't create a Calendar instance in render() function. There is no real element of |
Here's my code after i fixed it but it gives me the same error! Can you help me further? import React from 'react'
import Calendar from 'tui-calendar'
class CalendarMain extends React.Component {
state = {
options: {
defaultView: 'month',
template: {
monthGridHeader: function(model) {
var date = new Date(model.date);
var template = '<span class="tui-full-calendar-weekday-grid-date">' + date.getDate() + '</span>';
return template;
}
},
useCreationPopup: true,
useDetailPopup: true,
calendars: [],
month: {},
week: {}
}
}
componentDidMount() {
var calendar = new Calendar('#calendar', {
defaultView: 'month',
taskView: true,
template: {
monthGridHeader: function(model) {
var date = new Date(model.date);
var template = '<span class="tui-full-calendar-weekday-grid-date">' + date.getDate() + '</span>';
return template;
}
}
});
calendar.createSchedules([
{
id: '1',
calendarId: '1',
title: 'my schedule',
category: 'time',
dueDateClass: '',
start: '2018-01-18T22:30:00+09:00',
end: '2018-01-19T02:30:00+09:00'
},
{
id: '2',
calendarId: '1',
title: 'second schedule',
category: 'time',
dueDateClass: '',
start: '2018-01-18T17:30:00+09:00',
end: '2018-01-19T17:31:00+09:00',
isReadOnly: true // schedule is read-only
}
]);
}
render() {
return (
<div id="calendar" style={{height: 800 +'px'}}></div>)
}
}
export default CalendarMain |
@zeyadetman Can you provide this sample project to reproduce it? |
No discussion. I close this. If you have more issue, please leave it. |
Version
1.4.0
Development Environment
Windows10, on Chrome 67.
Current Behavior
Expected Behavior
display the calendar but the output is
tui-calendar.js:3512 Uncaught TypeError: Cannot read property 'split' of undefined
The text was updated successfully, but these errors were encountered: