Skip to content

Commit 78e9c6f

Browse files
committed
chore: enhance Scheduler custom editor example
1 parent c0bcc89 commit 78e9c6f

File tree

2 files changed

+14
-36
lines changed

2 files changed

+14
-36
lines changed

scheduler/scheduler-custom-editor/SchedulerCustomEditor/SchedulerCustomEditor.csproj

+4-36
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,7 @@
2929
<RestorePackages>true</RestorePackages>
3030
<MvcProjectUpgradeChecked>true</MvcProjectUpgradeChecked>
3131
<UseGlobalApplicationHostFile />
32-
33-
34-
35-
36-
37-
38-
39-
40-
41-
42-
43-
44-
45-
46-
32+
<Use64BitIISExpress />
4733
</PropertyGroup>
4834
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
4935
<DebugSymbols>true</DebugSymbols>
@@ -67,7 +53,6 @@
6753
<HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
6854
</Reference>
6955
<Reference Include="Kendo.Mvc">
70-
7156
<HintPath>..\lib\KENDOUIMVC\2017.1.223.545\Kendo.Mvc.dll</HintPath>
7257
</Reference>
7358
<Reference Include="Microsoft.CSharp" />
@@ -82,7 +67,6 @@
8267
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
8368
<Private>True</Private>
8469
</Reference>
85-
8670
<Reference Include="System" />
8771
<Reference Include="System.Data" />
8872
<Reference Include="System.Drawing" />
@@ -172,9 +156,6 @@
172156
<Content Include="Views\Web.config" />
173157
</ItemGroup>
174158
<ItemGroup>
175-
176-
177-
178159
<Content Include="Views\Home\About.cshtml" />
179160
</ItemGroup>
180161
<ItemGroup>
@@ -228,11 +209,10 @@
228209
<ItemGroup>
229210
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
230211
</ItemGroup>
231-
<ItemGroup />
232212
<ItemGroup>
233-
234-
235-
213+
<Content Include="Views\Home\EditorTemplates\CustomEditorTemplate.cshtml" />
214+
</ItemGroup>
215+
<ItemGroup>
236216
<EntityDeploy Include="Models\Sample.edmx">
237217
<Generator>EntityModelCodeGenerator</Generator>
238218
<LastGenOutput>Sample.Designer.cs</LastGenOutput>
@@ -253,18 +233,6 @@
253233
<LastGenOutput>Sample.cs</LastGenOutput>
254234
</Content>
255235
</ItemGroup>
256-
257-
258-
259-
260-
261-
262-
263-
264-
265-
266-
267-
268236
<PropertyGroup>
269237
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
270238
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

scheduler/scheduler-custom-editor/SchedulerCustomEditor/Views/Home/Index.cshtml

+10
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,20 @@
4848
.Destroy("Meetings_Destroy", "Home")
4949
.Update("Meetings_Update", "Home")
5050
)
51+
.Events(e => e.Edit("onEdit"))
5152
)
5253

5354

5455
<script type="text/javascript">
56+
function onEdit(e) {
57+
var start = e.event.start;
58+
var recurrenceEditor = e.container.find('#RecurrenceRule').data('kendoRecurrenceEditor');
59+
60+
recurrenceEditor.setOptions({
61+
start: start
62+
});
63+
}
64+
5565
function error_handler(e) {
5666
if (e.errors) {
5767
var message = "Errors:\n";

0 commit comments

Comments
 (0)