The Diagram's JS handle-creation logic (_createHandles) throws an exception whenever a connection has both Points.Enabled = true and Drag/Remove enabled at the same time.
A js exception is thrown: Uncaught TypeError: can't access property "radius", e.midpoint is undefined
No exception is thrown.
Workaround:
Do not set the Points property in the DiagramConnectionEditableDescriptor:
*Points = new DiagramConnectionEditablePointsDescriptor
*
Editable = new DiagramConnectionEditableDescriptor
{
Enabled = true,
Drag = true,
Remove = false
}
If using declarative shapes, remove:
<DiagramConnectionEditablePoints Enabled="true" />
from the connections.
Telerik UI for Blazor 15.2.0 introduces a few problems with the Signature Value:
A workaround for the first issue is to recreate the component:
<TelerikButton OnClick="@ClearSignature" Visible="@(!string.IsNullOrEmpty(SignatureValue))">Clear</TelerikButton>
<TelerikSignature @bind-Value="@SignatureValue"
Width="600px"
Height="200px" />
Workaround:
@if (ShouldRenderSignature)
{
<TelerikSignature @bind-Value="@SignatureValue"
Width="600px"
Height="200px" />
}
@code {
private string? SignatureValue { get; set; }
private bool ShouldRenderSignature { get; set; } = true;
private async Task ClearSignature()
{
SignatureValue = null;
ShouldRenderSignature = false;
await Task.Delay(1);
ShouldRenderSignature = true;
}
}
The only scenario that works is to set the initial Zoom to a numeric value and have an open file by default.
The NOW button in the TimePicker's TimeView sets the time value, according to the server's time zone. Instead, it should use the client-side (user) time zone.
===
Telerik edit:
In the meantime, you can subscribe to the TimePicker's ValueChanged event and detect when the user clicks on Now. In such cases, the event handler will receive the current server time with a small margin of error, that depends on the latency.
<TelerikTimePicker Value="@TimePickerValue"
ValueChanged="@( (DateTime? d) => TimePickerValueChanged(d) )">
</TelerikTimePicker>
@code {
private DateTime? TimePickerValue { get; set; }
private void TimePickerValueChanged(DateTime? newValue)
{
if (newValue.HasValue && newValue - DateTime.Now < new TimeSpan(0, 0, 1))
{
// Retrieve and set the correct user's local time. The dummy code below is just for testing.
TimePickerValue = DateTime.Now.AddMinutes(2);
}
else
{
TimePickerValue = newValue;
}
}
}
The PDF Viewer may render parts of the contents as blank (empty space) and only form elements like checkboxes remain visible.
Test PDF file in ticket 1716925
With Blazor server, clicking the NOW button (obviously) sets the time to the time on the server since that's where the code is running. Is there a way to trap the NOW button click or somehow give it an offset or define the value that NOW means so NOW will mean the time that the user is sitting in?
---
TELERIK EDIT
In the meantime, here are a few possible workarounds:
1. Use the DateTimePicker's ValueChanged event to detect new values that are very close or match the server's current DateTime. In such cases, you can assume that the user has clicked on TODAY / NOW, and set the local user time as a component value.
Server Time on UI Refresh: @DateTime.Now.ToLongTimeString()
<br />
User Local Time on Page Load: @LocalTime?.ToLongTimeString()
<br />
User Local Time Offset: @LocalOffset
<br />
<br />
<TelerikDateTimePicker Value="@PickerValue"
ValueChanged="@( (DateTime? newValue) => PickerValueChanged(newValue) )"
ValueExpression="@( () => LocalTime )"
Format="yyyy-MMM-dd HH:mm:ss"
Width="240px" />
<!-- Move JS code to a separate JS file in production -->
<script suppress-error="BL9992">
function getLocalTime() {
var d = new Date();
return d.getTimezoneOffset();
}
</script>
@code {
private DateTime? PickerValue { get; set; }
private DateTime? LocalTime { get; set; }
private int LocalOffset { get; set; }
private void PickerValueChanged(DateTime? newValue)
{
DateTime serverNow = DateTime.Now;
DateTime utcNow = DateTime.UtcNow;
TimeSpan nowTolerance = new TimeSpan(0, 0, 10);
if (newValue - serverNow < nowTolerance)
{
PickerValue = utcNow.AddMinutes(-LocalOffset);
}
else
{
PickerValue = newValue;
}
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
LocalOffset = await js.InvokeAsync<int>("getLocalTime");
LocalTime = DateTime.UtcNow.AddMinutes(-LocalOffset);
StateHasChanged();
}
await base.OnAfterRenderAsync(firstRender);
}
}
2. Use the DatePicker's HeaderTemplate with a custom TODAY / NOW button.
3. Hide the NOW button with CSS:
<style>
.no-now-button .k-time-now {
display: none;
}
</style>
<TelerikDateTimePicker @bind-Value="@PickerValue"
Format="yyyy-MMM-dd HH:mm:ss"
PopupClass="no-now-button"
Width="240px" />
@code {
private DateTime? PickerValue { get; set; }
}
Related to https://progresssoftware.atlassian.net/browse/BLZ-3112
(bug report only)
The issue is also reproducible in the other dropdown components.
(optional)
The aria-activedescendant attribute on the <input> element points to a non-existent element.
The aria-activedescendant attribute on the <input> element must point to the unique id string of the currently active (visually highlighted) <li role="option"> inside the popup listbox. When the popup opens but no item is highlighted (as in the case where the component is not bound to data) the attribute should omitted.