The Pickers are not bound to model value when a nullable DateTime is set.
public class MyModel
{
public DateTime? Birthday { get; set; }
}
@(Html.Kendo().TimePickerFor(m => m.Birthday))
The Pickers are not bound to model value when nullable.
The Pickers are not bound to model value when a nullable DateTime is set.
Kendo UI version: 2024.4.1112
jQuery version: x.y
Browser: [all]
### Bug report
When building the scripts through the 'npx gulp scripts' command, there is an error "Error: Cannot find module './build/gulp/kendo-version'".
### Reproduction of the problem
Download any of the source bundles (Core, MVC, jQuery) and try to build the scripts.
### Environment
* **Kendo UI version: 2024.4.1112
Bug report
For the Telerik Scheduler Timeline View, since the update from somewhere in between version 2022.3.1109 to 2024.2.154, a custom timeline view cannot be selected if the view name has dot(s) in its name (e.g. "kendo.ui.customTimelineView").
Reproduction of the problem
Add a custom Timeline View by extending the kendo.ui.TimelineView
Current behavior
Unlike older versions (I know that it worked with version <= 2022.3.1109, but don't know when exactly it was introduced) now the ui blocks, when the custom select view button is clicked. Specifically, the problem is in kendo.scheduler.js at line 4554:
var viewElementToSelect = that.toolbar.find("[" + kendo.attr("name") + "=" + name + "]");
Expected behavior
In this code line, the find method does not work when the variable "name" contains something like "kendo.ui.CustomTimelineView". As a solution, I suggest escaping the name beforehand:
var nameEscaped = $.escapeSelector(name); var viewElementToSelect = that.toolbar.find("[" + kendo.attr("name") + "=" + nameEscaped + "]");
Currently, the Telerik UI for ASP.NET Core DataSource does not expose a Deferred()
API configuration. In comparison to its Telerik UI for ASP.NET MVC counterpart.
It would be beneficial to expose the ability to defer the component in the following manner:
@(Html.Kendo().DataSource<TelerikMvcApp119.Models.OrderViewModel>()
.Name("ds")
.Ajax(dataSource => dataSource
.Read(read => read.Action("AssetType_Read", "AssetTypes"))
)
.Deferred()
)
It will also enable users to employ CSP using a granular deferred initialization into a separate script tag. Annotated with the nonce
attribute
The Telerik UI for ASP.NET Core DataSource does not expose a built-in configuration for deferring the DataSource.
The Telerik UI for ASP.NET Core DataSource should expose a built-in configuration for deferring the DataSource.
TabStrip is not CSP compliant when the Selected() API configuration is enabled.
Selected()
API configuration for one of the items@(Html.Kendo().TabStrip()
.Name("tabstrip")
.Items(items =>
{
items.Add().Text("Details")
.Selected(true)
.LoadContentFrom("Details", "Home", Model);
})
)
Setting the Select()
API configuration will lead to the following Content Security Policy Header Report Error.
Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.
Setting the Select()
API configuration should not lead to a Content Security Policy Header Report Error.
Add a 3 state mode to the Switch component (like it is already implemented in the Telerik UI for WPF) or create new component with that feature.
Example:
When the Columns.Command.Edit.UpdateText property is set to Update
, the text will not be modified and will remain as the default value Save
.
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => {
command.Edit().UpdateText("Update"); //Will not work
}).Width(250);
})
//....
)
REPL
https://netcorerepl.telerik.com/wIuyvtcO41rAa82G36
The text should change to the specified content within UpdateText.
Set the text via JavaScript using the setOptions method and columns.command.text:
$(document).ready(function(){
var grid = $("#grid").data("kendoGrid");
var options = grid.getOptions();
//set the text for the first command in the last column
// as shown in the second example on:
//https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.command#columnscommandtext
options.columns[4].command[0].text = { edit: "Edit", update: "Update" };
grid.setOptions(options);
});
REPL
https://netcorerepl.telerik.com/wIYeGmOz39LL8mHN26
When uncheck "Use localization" while create project the Localization resources are still auto copied while publish the project.
The resources are part of the telerik.ui.for.aspnet.core.yyyy.q.mmdd.nupkg and therefore are copied to the bin folder regardless of the "Use localization" option. The "Use localization" option controls the availability only of the messages files.
This a feature request for providing another lightweight NuGet which does not contain the localization dlls that could be used for non-localized projects.
At this stage, the Serialize() method depends on Newtonsoft.Json:
using Newtonsoft.Json;
namespace Kendo.Mvc.Infrastructure
{
public class DefaultJavaScriptSerializer : IJavaScriptSerializer
{
public string Serialize(object value)
{
return JsonConvert.SerializeObject(value).Replace(@"<", @"\u003c").Replace(@">", @"\u003e");
}
}
}
Is it possible to remove the dependency and use the System.Text.Json serializer instead?
### Bug report
When the deferred scripts are created, the script source points at the root of the application instead of the application's root directory.
### Reproduction of the problem
Enable the global deferred initialization and call the @(Html.Kendo().DeferredScriptFile()) method.
The rendered script tag is: <script src="/kendo-deferred-scripts-XXXX.js"></script>
But it must be: <script src="/MyWebsite/kendo-deferred-scripts-XXXX.js"></script>
### Solution:
If you add a tilde in the Url.Content(), the generated script file must be located as expected:
public HtmlString DeferredScriptFile(string nonce = "")
{
...
var scriptResult= hasDeferredScritps ? $@"<script src=""{urlHelper.Content("~/kendo-deferred-scripts-" + guid + ".js")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')}></script>" : "";
var styleResult = hasDeferredStyles ? $@"<link href=""{urlHelper.Content("~/kendo-deferred-styles-" + guid + ".css")}"" {(string.IsNullOrEmpty(nonce) ? "" : "nonce=" + '"' + nonce + '"')} rel=""stylesheet""></link>" : "";
return new HtmlString(scriptResult + System.Environment.NewLine + styleResult);
}
### Environment
* **Telerik UI for ASP.NET Core version: 2023.3.1114
* **Browser:** [all]
When both UI for ASP.NET MVC and UI for ASP.NET Core Visual Studio extensions are installed and only UI for ASP.NET Core project is loaded, the notification for new version is shown for UI for ASP.NET MVC.
### Bug report
When the Dialog is configured with actions and the Content Security Policy is enabled, it throws an "Invalid template" error.
### Reproduction of the problem
1) Configure a Dialog widget with actions and set the CSP with the following content:
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' https://kendo.cdn.telerik.com https://code.jquery.com; style-src 'self' 'unsafe-inline' https://kendo.cdn.telerik.com;" />
2) Open the browser console to review the error.
A Dojo sample for reproduction: https://dojo.telerik.com/ULOyazUC
### Expected/desired behavior
The Dialog should be rendered correctly without using the 'unsafe-eval' keyword in the "script-src" directive.
### Workaround
Insert the following script before the Dialog initialization:
<script>
kendo.ui.Dialog.fn._mergeTextWithOptions = function(action) { var text = action.text; if(text) { return kendo.isFunction(text) ? text(this.options) : text; } return ""; }
</script>
### Environment
* **Kendo UI version: 2023.2.606
* **jQuery version: 3.4.1
* **Browser: [all]
Running WAVE on websites that use the Slider throw up a load of alerts to do with "Redundant title text" and "Unlabeled form control with title".
You can see examples of this on any demo page such as the Basic Usage one.
Can you please remove the offending attributes - or come up with values that don't throw these issues up? I'm not sure if they're in place to work with ToolTips, but if we elect not to support ToolTips (which is default behaviour) then they are effectively redundant.
I don't want to have to do this myself in script because it is an unnecessary overhead and may cause downstream issues in your code.
Test Environment:
OS Version: 22H2 OS Build 22621.1702
Edge Version: Edge(Chromium) Version 114.0.1823.37 (Official build) (64-bit)
Pre requisites:
High contrast mode: Settings->Accessibility->contrast themes-> select Aquatic/desert theme
Repro-Steps:
Users with low vision and who rely on high contrast aquatic and desert theme will face difficulties if the selected date is not visible clearly.
I'm looking to add the Nonce to the standard inline kendo initialization scripts rather that having to defer initialization and output the initialization scripts in a script tag with a nonce, as demonstrated in the documentation https://docs.telerik.com/aspnet-core/html-helpers/helper-basics/content-security-policy#for-r1-2023-sp1-and-later-working-with-telerik-ui-for-aspnet-mvc-components
Consider the use of TextWriter async methods for the HTML Helpers, for example the WriteInitializationScript methods. In certain scenarios the use of the synchronous methods causes an exception: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
This can be resolved by explicitly enabling synchronous operations
services.Configure<IISServerOptions>(options =>
{
options.AllowSynchronousIO = true;
});
though synchronous operations have been disabled by default at framework level as of .NET 3.0.