Mar 17, 2012, 10:20 AM
Why Calendar cannot render with EventStore?
Hi all! Sorry, my english is too bad :)
Today, I use CalendarPanel in first time, and i wonder why my CalendarPanel can't render full if i put any events to it. It only display at Month view, but Week view and Day view are blank. I can't do anything if event in CalendarPanel.
And it works fine when i remove
Today, I use CalendarPanel in first time, and i wonder why my CalendarPanel can't render full if i put any events to it. It only display at Month view, but Week view and Day view are blank. I can't do anything if event in CalendarPanel.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ext.Net Example</title>
<script type="text/javascript">
var CompanyX = {
getWindow: function () {
return CompanyX.EventEditWindow1;
},
dayClick: function (cal, dt, allDay, el) {
this.record.show.call(this, cal, {
StartDate: dt,
IsAllDay: allDay
}, el);
},
record: {
show: function (cal, rec, el) {
CompanyX.getWindow().show(rec, el);
}
}
};
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="CompanyX" />
<ext:Viewport ID="Viewport1" runat="server">
<Items>
<ext:CalendarPanel ID="CalendarPanel1" runat="server" Height="500">
<EventStore ID="EventStore1" runat="server" >
<Events>
<ext:Event
EventId="0"
Title="My event 1"
StartDate="2012/3/15"
EndDate="2012/3/18"
CalendarId="1" />
</Events>
</EventStore>
<GroupStore ID="GroupStore1" runat="server">
<Groups>
<ext:Group CalendarId="1" Title="Work" />
</Groups>
</GroupStore>
<Listeners>
<DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
</Listeners>
</ext:CalendarPanel>
</Items>
</ext:Viewport>
<ext:EventEditWindow
ID="EventEditWindow1"
runat="server"
Hidden="true"
GroupStoreID="GroupStore1">
<Listeners>
<Render Handler="var titleItem = this.formPanel.get('title'),
dateRangeItem = this.formPanel.get('date-range'),
calendarItem = this.formPanel.get('calendar');
titleItem.id = 'titleId';
titleItem.fieldLabel = 'My Title';
titleItem.dataIndex = 'Title'" />
</Listeners>
</ext:EventEditWindow>
</form>
</body>
</html>
And result is :And it works fine when i remove
<Events>
<ext:Event
EventId="0"
Title="My event 1"
StartDate="2012/3/15"
EndDate="2012/3/18"
CalendarId="1" />
</Events>