Duplicated
Last Updated: 26 Sep 2024 07:01 by ADMIN

I want to set the initially focused time/date for the DateTimePicker before opening the picker to improve the user experience. When opening the DateTimePicker with a null value the preselected date is the current day and the time is always 00:00/12:00AM.

I do not want to set value for the component but rather alter the time/date that will be initially focused when opening the popup.

===

ADMIN EDIT

===

The request also applies to the rest of the pickers - DatePicker, DateRangePicker and TimePicker.

Unplanned
Last Updated: 08 Aug 2024 15:30 by Twain

The input in the DateTimePicker is valid when:

- the DateTimePicker value is bound to nullable DateTime and

- the user clears the input

In such cases, the input field shouldn't get a red border.

Here is a REPL example to reproduce the issue:

  1. Select a date.
  2. Clear the date. The input gets a red border.

===ADMIN EDIT===

A possible workaround is to change the border color with CSS. Here is a REPL example.


Planned
Last Updated: 06 Aug 2024 10:00 by ADMIN
Scheduled for 2024 Q4 (Nov)
In our serverside blazor application we use the Telerik's DateTimePicker. When we type values in to the date time picker control, it jumps to the next section or to the end before completing the currect section. We use the format 'yyyy-MM-dd HH:mm'

It does not happen always and I think it is happenning when the internet connection is slow and it shows a Javascript error as well (screenshots below)
Completed
Last Updated: 29 Jul 2024 14:32 by John
Release 2024 Q2 (May)

Hello,

A Date/Time Picker is bound to a nullable DateTime value. If the user clears the value with the keyboard, the component will show as invalid (with red border). Instead, the picker should treat null values as valid.

Here is a test page with a few different workarounds:

<TelerikButton OnClick="@( () => DateValue = null )">Clear Value</TelerikButton>
<TelerikButton OnClick="@( () => DateValue = DateTime.Now )">Set Value</TelerikButton>

DateValue.HasValue: @DateValue.HasValue

<p>Default behavior:</p>

<TelerikDatePicker @bind-Value="@DateValue"
                   Width="200px" />

<p>Red border will disappear after blur (CSS):</p>

<TelerikDatePicker @bind-Value="@DateValue"
                   Width="200px"
                   Class="@( !DateValue.HasValue ? "valid-null" : "" )" />

<p>Red border will never appear (CSS):</p>

<TelerikDatePicker @bind-Value="@DateValue"
                   Width="200px"
                   Class="valid-null" />

<p>Red border will disappear after blur (OnChange):</p>

<TelerikDatePicker @bind-Value="@DateValue"
                   Width="200px"
                   OnChange="@OnPickerChange" />


<style>
    .k-input.k-invalid.valid-null {
        border-color: rgba(0, 0, 0, 0.08);
    }
</style>

@code {
    private DateTime? DateValue { get; set; } = DateTime.Now;

    private async Task OnPickerChange(object newValue)
    {
        DateTime? newDate = (DateTime?)newValue;

        if (!newDate.HasValue)
        {
            DateValue = DateTime.Now;
            await Task.Delay(1);
            DateValue = null;
        }
    }
}

Declined
Last Updated: 23 Jul 2024 09:19 by ADMIN
Created by: Domingos Portela
Comments: 1
Category: DateTimePicker
Type: Bug Report
0

In the TelerikDatePicker, when I select the date and click outside, the event triggers one time only, but when I do the same inside the TelerikDateTimePicker it triggers two times (the first when I set the time and the second when I click outside).

In the end of the ticket I will provide a simple demo code used in Telerik REPL for Blazor comparing the behaviour between the two elements.

Additionally I would like to report the fact that in the TelerikDateTimePicker, when there's no value and I open the calendar and click "Set" without doing anything else, the DateTime is set to "01/01/0001 00:00" instead of null.

<TelerikDatePicker @bind-Value="@DatePickerValue" OnChange="@DatePickerHandler" Format="dd/MM/yyyy" />
DatePicker triggered @DatePickerTriggerCount time(s)
<br />
<br />
<TelerikDateTimePicker @bind-Value="@DateTimePickerValue" OnChange="@DateTimePickerHandler" Format="dd/MM/yyyy HH:mm" />
DateTimePicker triggered @DateTimePickerTriggerCount time(s)
@code {
    private int DatePickerTriggerCount { get; set; }
    private int DateTimePickerTriggerCount { get; set; }
    private DateTime? DatePickerValue { get; set; }
    private DateTime? DateTimePickerValue { get; set; }
    private void DatePickerHandler(object userInput)
    {
        DatePickerTriggerCount += 1;
    }
    private void DateTimePickerHandler(object userInput)
    {
        DateTimePickerTriggerCount += 1;
    }
}
Unplanned
Last Updated: 12 Jul 2024 07:05 by ADMIN

If you are zooming a page containing a DateTimePicker with "AdaptiveMode" set to "AdaptiveMode.Auto", the application crashes occasionally with the error:

Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'addEventListener')
TypeError: Cannot read properties of null (reading 'addEventListener')

The more adaptive DateTimePicker instances the page contains, the more likely the error is to occur.

 

 

Completed
Last Updated: 11 Apr 2024 08:10 by ADMIN
Release 2024 Q2 (May)

Hey Telerik team,

We encountered issue with DateTime picker which I was able to reproduce in your Documentation preview.

If you hover over the date time dropdown, but really slowly it bugs out and the view becomes unusable like this:

As you can see, the dropdown is messed up and it seems like the hover over the border is trying to trigger some action to change from date to time pick automatically

 

Jakub

Unplanned
Last Updated: 29 Mar 2024 10:46 by Austin

Hi.

When entering an invalid date in a DateTimePicker, the component will automatically revert the entered value back to its previous valid value.

I didn't expect this because the user may type in an invalid date, and continue to the next input control within the form, and not notice the error that was briefly displayed.

The issue can be reproduced in the DateTimePicker Demo here: https://demos.telerik.com/blazor-ui/datetimepicker/validation

Steps to reproduce:

1. Click in the day part of the date.

2. Enter 13

3. Enter 2100

4. Press the Tab key

5. Notice the date is automatically reverted (back) to 10/13/2019.

 

I expected the date to be set to 10/13/2100 with the input validation errors visible to the user after pressing the Tab key in step 4.

 

I've categorized this issue as a bug because otherwise, the form can be submitted with a value that the user did not enter.

 

If this behavior cannot be changed from being the default behavior, then there should be an option to prevent this behavior from happening.

 

Thank you.

Completed
Last Updated: 28 Feb 2024 14:31 by ADMIN

Some users report that the hour selector of the datetime picker is not visible. For some people it starts to show if you move the scroll wheel. For some that does not help. This does not happen for all users and can be tricky to replicate. I can replicate it on certain zoom levels and resolutions.

I can replicate this on the demo site. Screenshot added. 

I can also make it work again by removing "translateY(93px)". Screenshot added.

Completed
Last Updated: 28 Feb 2024 12:24 by ADMIN
Release 2024 Q2 (May)
The Now button is hard-coded in uppercase. I cannot change it even with Localization. I want to be able to provide different casing for the text in the button. 
Unplanned
Last Updated: 18 Sep 2023 09:08 by Richard

When the component's Adaptive mode is set to Auto, the Date & Time buttons in the popup are not rendered. 

<AdminEdit>

Here is a CSS workaround that hides the titlebar in adaptive mode so that the buttons are present:

<style>
    .k-actionsheet-titlebar.k-text-center{
        display: none;
    }
</style>

<TelerikDateTimePicker @bind-Value="@SelectedTime"
                        Format="MM/dd/yyyy hh:ss"
                        ShowWeekNumbers="true"
                        Id="selected-date"
                        AdaptiveMode="Telerik.Blazor.AdaptiveMode.Auto">
</TelerikDateTimePicker>

@code {
    private DateTime? SelectedTime = DateTime.Now;
}

</AdminEdit>

Unplanned
Last Updated: 06 Jun 2023 12:39 by ADMIN
Created by: Stewart
Comments: 5
Category: DateTimePicker
Type: Feature Request
2

Hi,

I have a REPL showing the issue.

I am using DataAnnotation where possible in my application and I was expecting the DisplayFormat attribute to be applied in the DateTimePicker like it is for DatePicker but as shown in the REPL link below it's not. I will use a workaround of applying the Format attribute everywhere but I would appreciate this being changed.

https://blazorrepl.telerik.com/GdkpcclE28sZ9VZH54

Duplicated
Last Updated: 16 May 2023 14:59 by ADMIN
Created by: John
Comments: 1
Category: DateTimePicker
Type: Bug Report
1

Hey,

 

Just reporting this as an active bug. If I have a nullable DateTime object, and I erased the date on the date time picker, it treats the date time field as invalid. I would expect it to be treated as valid.

Related thread: https://feedback.telerik.com/blazor/1582282-datepicker-should-accept-null-value-as-valid-when-bound-to-nullable-datetime

This is the razor page:

<TelerikDatePicker Id="@Id"
   T="DateTime?"
   Value="@Value"
   ValueExpression="@ValueExpression"
   ValueChanged="@ValueChanged"
   OnChange="@OnChange"
   Class="@($"{InputClass}")"
   Enabled="@Enabled"
   Format="@DateTimeFormat.DateOnly"
   Min="@MinDateTime"
   Max="@MaxDateTime"
   Width="@Width"></TelerikDatePicker>
Unplanned
Last Updated: 08 Feb 2023 12:20 by Yanislav
Created by: Martin Herløv
Comments: 1
Category: DateTimePicker
Type: Bug Report
3

DateTimePicker loses focus when the NOW button is clicked. 

To reproduce the problem open the following demo:

https://demos.telerik.com/blazor-ui/datetimepicker/overview

Try clicking a few times on the NOW button. The focus is occasionally lost. 

https://www.screencast.com/t/BPEXTy43

 

 

 

 

 

Completed
Last Updated: 09 Sep 2022 05:13 by ADMIN
Release 3.6.0 (14 Sep 2022) (R3 2022)

Add "OnOpen" event that fires when the DateTimePicker  button is clicked but before the DateTimePicker  dropdown is shown

 

=============

ADMIN EDIT

=============

You can currently achieve the desired behavior by wrapping the DateTimePicker in a container (for example span), add a handler on the on-click event of the span to catch the click event and perform the desired actions in that handler.

<span class="datetimepicker-span" @onclick="@OnOpenHandler">
    <TelerikDateTimePicker Class="my-date-time-picker" Value="@selectedTime"
                           Format="dd MMM yyyy HH:mm:ss" Width="250px"></TelerikDateTimePicker>
</span>

@code {
    public DateTime? selectedTime { get; set; }

    public bool isOpened { get; set; } = false;

    public void  OnOpenHandler()
    {
        isOpened = !isOpened;

        if (isOpened)
        {
            Console.WriteLine("DateTimePicker was opened.");
        }
        else
        {
            Console.WriteLine("DateTimePicker was closed.");
        }
    }
}

Completed
Last Updated: 29 Jun 2022 13:34 by ADMIN
Release 3.4.0
When the Date*Picker is in the ToolBar of the Grid, the button is not positioned correctly to the width of the input
Completed
Last Updated: 08 Apr 2022 07:50 by ADMIN
Release 3.2.0

If you enter a format with a 24 hour time( Format="dd MMM yyyy HH:mm:ss")  for the Timepicker

If you enter the same format for the DateTimePicker the TimePicker in the DateTimePicker looks like this:

 

It seems like this is a bug as the only way I can change the DateTimePicker time UI is to alter my language/culture whereas the TimePicker displays correctly based on my format. 

 

 

 

Completed
Last Updated: 15 Mar 2022 18:45 by ADMIN
Release 3.2.0
The TelerikDateTimePicker does not render the 24h time format in the dropdown tumbler. 
Unplanned
Last Updated: 11 Feb 2022 09:45 by Grant
Created by: Grant
Comments: 0
Category: DateTimePicker
Type: Feature Request
4
I have a case where I need the users to be able to change the date and time, but most will just be editing the time? Is there a way to default open to the Time Page rather than opening the Date page every time?
Unplanned
Last Updated: 11 Dec 2021 09:49 by ADMIN
Created by: Doug
Comments: 3
Category: DateTimePicker
Type: Feature Request
14

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?

---

ADMIN EDIT

One way this could land could be through templates for the header areas of the calendars - that would let you put your own NOW button there so you can handle its click and change the value as desired. So, you may want to follow and/or Vote for this approach here: https://feedback.telerik.com/blazor/1468855-header-template-for-the-calendars.

A workaround for the time being could be hiding the Now button with some CSS:

<style>
    .no-now-button .k-time-now {
        display: none;
    }
</style>

Selected time: @selectedTime
<br />

<TelerikDateTimePicker PopupClass="no-now-button"
                       Min="@Min" Max="@Max" @bind-Value="@selectedTime"
                       Format="dd MMM yyyy HH:mm:ss" Width="250px"></TelerikDateTimePicker>

@code {
    private DateTime? selectedTime = DateTime.Now;
    public DateTime Min = new DateTime(1990, 1, 1, 8, 15, 0);
    public DateTime Max = new DateTime(2025, 1, 1, 19, 30, 45);
}

---

1 2