This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.tsx
More file actions
134 lines (131 loc) · 6.08 KB
/
default.tsx
File metadata and controls
134 lines (131 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import {
ScheduleComponent, ViewsDirective, ViewDirective,
Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop
} from '@syncfusion/ej2-react-schedule';
import { scheduleData } from './datasource';
import './schedule-component.css';
import { extend } from '@syncfusion/ej2-base';
import { DatePickerComponent, ChangeEventArgs } from '@syncfusion/ej2-react-calendars';
import { SampleBase } from '../common/sample-base';
import { PropertyPane } from '../common/property-pane';
/**
* Schedule Default sample
*/
export class Default extends SampleBase<{}, {}> {
private scheduleObj: ScheduleComponent;
private data: Object[] = extend([], scheduleData, null, true) as Object[];
private change(args: ChangeEventArgs): void {
this.scheduleObj.selectedDate = args.value;
this.scheduleObj.dataBind();
}
render() {
return (
<div className='schedule-control-section'>
<div className='col-lg-9 control-section'>
<div className='control-wrapper'>
<ScheduleComponent height='650px' ref={schedule => this.scheduleObj = schedule}
selectedDate={new Date(2018, 1, 15)} eventSettings={{ dataSource: this.data }}>
<ViewsDirective>
<ViewDirective option='Day' />
<ViewDirective option='Week' />
<ViewDirective option='WorkWeek' />
<ViewDirective option='Month' />
<ViewDirective option='Agenda' />
</ViewsDirective>
<Inject services={[Day, Week, WorkWeek, Month, Agenda, Resize, DragAndDrop]} />
</ScheduleComponent>
</div>
</div>
<div className='col-lg-3 property-section'>
<PropertyPane title='Properties'>
<table id='property' title='Properties' className='property-panel-table' style={{ width: '100%' }}>
<tbody>
<tr style={{ height: '50px' }}>
<td style={{ width: '30%' }}>
<div className='col-md-4' style={{ paddingTop: '8px' }}>Current Date</div>
</td>
<td style={{ width: '70%' }}>
<div className='datepicker-control-section'>
<DatePickerComponent value={new Date(2018, 1, 15)} change={this.change.bind(this)}></DatePickerComponent>
</div>
</td>
</tr>
</tbody>
</table>
</PropertyPane>
</div>
<div id='action-description'>
<p>This demo showcases how the flat Schedule looks like with its default set of minimal configurations. Here, some of the
documentary shows are displayed as events parallel to its relevant telecast timings. The show names are given as
event's subject and simply notified of the start and end of it.</p>
</div>
<div id='description'>
<p>
The Schedule is an event calendar which facilitates user with the common Outlook-calendar features, thus allowing them to
plan and manage the appointments and its time in an efficient manner. It comes with 6 different view modes as listed
below, out of which the
<code>Week</code> view is set as active.
</p>
<ul>
<li>Day</li>
<li>Week</li>
<li>Work Week</li>
<li>Month</li>
<li>Agenda</li>
<li>Month Agenda</li>
</ul>
<p>To navigate between views and dates, the navigation options are available at the Schedule header bar and the active view
option is highlighted in it by default. The date range of the active view will also be displayed in the header bar,
clicking on which will open a calendar popup for ease of required date selection. </p>
<p>
<strong>Touch actions on Mobile mode</strong>
</p>
<table style={{ width: '100%' }}>
<tr>
<th style={{ width: '100px' }}>
<strong>Action</strong>
</th>
<th>
<strong>Description</strong>
</th>
</tr>
<tr>
<td style={{ padding: '4px 0' }}>Single Tap</td>
<td>Single tapping on events, opens the popup showing event information.</td>
</tr>
<tr>
<td style={{ verticalAlign: 'top', padding: '4px 0' }}>Tap hold </td>
<td>
<ol style={{ paddingLeft: '12px' }}>
<li>Tap holding on cells, opens the new event editor. </li>
<li>Tap holding on events, opens a small popup at the top holding the options to edit or delete and also
displays the selected event’s subject. As a continuation of this action, if user keeps on single
tapping on other events will allow the multiple event selection along with that popup remaining in
opened state counting the number of events selected.
</li>
<li>Tap holding the events will also open the tooltip on Schedule.</li>
</ol>
</td>
</tr>
</table>
<p>
<strong>Module Injection</strong>
</p>
<p>The key Schedule functionalities are maintained as individual feature-wise modules.
Therefore to avail with a particular feature,
appropriate module needs to be injected using <code>services</code> property under <code>Inject</code> tag.
For example,
to work with the day view on Schedule – it is necessary to inject the Day module
using <code>services</code> property under <code>Inject</code> tag.
</p>
<p>
<strong> Note:</strong> In case, if the module of active view is not injected from the application end – then the Schedule
is configured to display the first available option in the <code>views</code> property.
</p>
</div>
</div>
);
}
}