Our pure JavaScript Scheduler component


Post by zno »

Hi!

I've managed to get a basic scheduler to load inside of a custom polymer component, where can I find more documentation on how to insert data into the scheduler?

For instance, how do I set the features in the scheduler?

Here's my working example below:
<link rel="import" href="/sys/polymer/polymer.html">

<template>
    <dom-bind>
        <template is="dom-bind">
            <script type="module" src="/build/scheduler.module.js"></script>
            <link rel="stylesheet" href="/build/scheduler.dark.css" id="bryntum-theme" />
            <bryntum-scheduler data-view-preset="weekAndDay" data-start-date$="{{model.Start$}}" data-end-date$="{{model.End$}}">
              <features data-stripe="true" data-group="groupId" data-sort="name"></features>
                <column data-field="name" data-text="Name" data-width="100">Name</column>
                
                <data>
                    <events>
                        <template is="dom-repeat" items="[[model.Events]]" as="event">
                            <data data-name$="[[event.Name]]" data-id$="[[event.Id]]" data-resource-id$="[[event.ResourceId]]" data-start-date$="[[event.Start]]" data-end-date$="[[event.End]]"></data>
                        </template>
                    </events>
                    <resources>
                        <template is="dom-repeat" items="[[model.Resources]]" as="resource">
                            <data data-id$="[[resource.Id]]" data-name$="[[resource.Name]]"></data>
                        </template>
                    </resources>
                </data>
            </bryntum-scheduler>
        </template>
    </dom-bind>
</template>

Post by zno »

I've tried to take inspiration from: https://www.bryntum.com/docs/gantt/#Gantt/customElements/GanttTag
<feature data-name="group" data-field="category" data-ascending="false"></feature>
nothing happens I'm afraid..

Post by pmiklashevich »

Not supported out of the box. That custom element is never promised to be a fully functional thing. We included it for demo purposes only.

From docs:
This is more of a proof of concept than a ready to use class.
Though if you had a license you would look at the code base and get some inspiration out of it. Not available in the trial, sorry.

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply