@kris-hill2010gmail-com
@kris-hill2010gmail-com
Forum Replies Created
-
AuthorPosts
-
Kris HillParticipant
I appreciate the quick reply but it does not seem to be working for me. I took your iCal data and put it into a calendar.ics file on my web server. I get the same error that I get before when I attempt to load from my controller. If I put the URL to the ICS file it downloads the file correctly. Do you see anything wrong that I’m missing?
Here is the HTML based on scheduler example:
<div class=”content”>
<section id=”sideA”>
<div class=”calButton-container”>
</div>
<div class=”controls-container”>
<smart-calendar id=”calendar”></smart-calendar>
<smart-input id=”searchBar” class=”underlined” placeholder=”Search this calendar”></smart-input>
<smart-tree id=”calTree” selection-mode=”checkBox” toggle-element-position=”far”>
<smart-tree-items-group expanded>
My calendars
<smart-tree-item value=”birthday” selected>Birthdays</smart-tree-item>
<smart-tree-item value=”holiday” selected>Holidays</smart-tree-item>
<smart-tree-item value=”event” selected>Events</smart-tree-item>
</smart-tree-items-group>
</smart-tree>
</div>
</section>
<section id=”sideB”>
<smart-scheduler id=”calScheduler”></smart-scheduler>
</section>
</div>Here is the javascript code:
const calDataSource = new window.Smart.DataAdapter({
dataSource: ‘/landing/calendar.ics’, ///calendardata/.ics?applicationId=@Model.Id’,
dataSourceType: ‘ics’,
dataFields: [
{ name: ‘dateStart’, map: ‘DTSTART’, dataType: ‘date’ },
{ name: ‘dateEnd’, map: ‘DTEND’, dataType: ‘date’ },
{ name: ‘label’, map: ‘SUMMARY’, dataType: ‘string’ },
{ name: ‘location’, map: ‘LOCATION’, dataType: ‘string’ },
{ name: ‘description’, map: ‘DESCRIPTION’, dataType: ‘string’ },
{ name: ‘rrule’, map: ‘RRULE’, dataType: ‘string’ },
{ name: ‘extdate’, map: ‘EXDATE’, dataType: ‘string’ },
{ name: ‘status’, map: ‘STATUS’, dataType: ‘string’ },
{ name: ‘reccurenceId’, map: ‘RECURRENCEID’, dataType: ‘string’ },
{ name: ‘uid’, map: ‘UID’, dataType: ‘string’ },
{ name: ‘categories’, map: ‘CATEGORIES’, dataType: ‘string’ },
{ name: ‘alarm’, map: ‘ALARM’, dataType: ‘any’ }
]
});window.Smart(‘#calScheduler’, class {
get properties() {
return {
//Properties
view: ‘month’,
views: [‘day’, ‘week’, ‘month’],
dataSource: calDataSource,
dateCurrent: new Date(),
firstDayOfWeek: 1
//disableDateMenu: true,
//currentTimeIndicator: true
};
}
});The error I’m getting is:
Uncaught TypeError: Cannot read properties of undefined (reading ‘appendChild’)
at BaseElement.appendChild (smart.grid.js:1379:94941)
at BaseElement._handleDataAdapter (smart.scheduler.js:199:43175)
at BaseElement.propertyChangedHandler (smart.scheduler.js:199:17058)
at t.updateProperty (smart.grid.js:1379:72986)
at BaseElement.set [as dataSource] (smart.grid.js:1379:74120)
at smart.grid.js:1379:81524
at window.<computed> (smart.grid.js:1379:81584)
at HTMLDocument.<anonymous> (Project?selectedId=36:271:16)
at e (jquery.min.js:2:30005)
at t (jquery.min.js:2:30307) -
AuthorPosts