kendo.syncReady(function(){jQuery("#my-picker").kendoDatePicker({"format":"M/d/yyyy"});});
Unhandled exception at line 115, column 91 in https://localhost:44362/Account/Login
0x800a1391 - JavaScript runtime error: 'kendo' is undefined occurred
What did I miss? Why I'm getting this error?
Below are snippet of my code.
Thanks in advance!
Startup.cs
public void ConfigureServices(IServiceCollection services)
{
...
services.AddKendo();
...
}
_ViewImports.cshtml
@using Microsoft.AspNetCore.Identity
@using SSO
@using SSO.Data
@namespace SSO.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kendo.Mvc
_Layout.cshtml
...
<
head
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1.0"
/>
<
title
>@ViewData["Title"] - SSO</
title
>
<
environment
include
=
"Development"
>
<
link
rel
=
"stylesheet"
href
=
"~/lib/font-awesome/css/font-awesome.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"~/lib/font-awesome/css/font-awesome-badge.css"
/>
<
link
rel
=
"stylesheet"
href
=
"~/lib/bootstrap/dist/css/bootstrap.css"
/>
<
link
rel
=
"stylesheet"
href
=
"~/css/site.css"
/>
</
environment
>
<
environment
exclude
=
"Development"
>
<
link
rel
=
"stylesheet"
href
=
"~/lib/font-awesome/css/font-awesome.min.css"
/>
<
link
rel
=
"stylesheet"
href
=
"~/lib/font-awesome/css/font-awesome-badge.css"
/>
asp-fallback-href
=
"~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class
=
"sr-only"
asp-fallback-test-property
=
"position"
asp-fallback-test-value
=
"absolute"
/>
<
link
rel
=
"stylesheet"
href
=
"~/css/site.min.css"
asp-append-version
=
"true"
/>
</
environment
>
</
head
>
...
<
div
>
<
div
class
=
"container"
>
@RenderBody()
<
hr
/>
</
div
>
</
div
>
<
environment
include
=
"Development"
>
<
script
src
=
"~/lib/jquery/dist/jquery.js"
></
script
>
<
script
src
=
"~/lib/bootstrap/dist/js/bootstrap.js"
></
script
>
<
script
src
=
"~/js/site.js"
asp-append-version
=
"true"
></
script
>
</
environment
>
<
environment
exclude
=
"Development"
>
asp-fallback-src
=
"~/lib/jquery/dist/jquery.min.js"
asp-fallback-test
=
"window.jQuery"
crossorigin
=
"anonymous"
integrity
=
"sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk"
>
</
script
>
asp-fallback-src
=
"~/lib/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test
=
"window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
crossorigin
=
"anonymous"
integrity
=
"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
>
</
script
>
<
script
src
=
"~/js/site.min.js"
asp-append-version
=
"true"
></
script
>
</
environment
>
...
Index.cshtml
@page
@model IndexModel
@inject IAuthorizationService AuthorizationService
@using Microsoft.AspNetCore.Authorization
@inject IProductsToken ProductsToken
@using SingleSignOn.Services
@using Microsoft.AspNetCore.Http
@inject SignInManager<
ApplicationUser
> SignInManager
@inject UserManager<
ApplicationUser
> UserManager
@using Microsoft.AspNetCore.Identity
@using SSO.Data;
@using Kendo.Mvc.UI
@{
ViewData["Title"] = "Services";
}
...
<
div
class
=
"text-center"
>
<
h2
>Kendo UI DatePicker</
h2
>
@(Html.Kendo().DatePicker()
.Name("my-picker")
)
</
div
>
...