Unplanned
Last Updated: 04 Jun 2021 05:26 by ADMIN
Created by: Minto
Comments: 0
Category: DateInput
Type: Feature Request
2
Pressing 0 in the date input deletes the date and shows the format 
Unplanned
Last Updated: 25 Mar 2021 07:12 by ADMIN
Created by: Philip
Comments: 4
Category: DateInput
Type: Feature Request
10

My users want to paste dates in the date inputs (date pickers in our case). This seems to work in Kendo, but does not work in Blazor, even when the format of the copied data matches the Format of the component.

 

<p>
    Try copying this date which is valid in the current format: 23/03/1998
    <br />
    then paste it in the date picker and see what happens to the <code>TheDate</code> field
</p>

@TheDate
<br />

<TelerikDateInput @bind-Value="TheDate" Format="dd/MM/yyyy" /> @TheDate.ToString("dd/MM/yyyy")

@code {
    DateTime TheDate { get; set; } = new DateTime(2019, 11, 27, 02, 03, 44);
}

---

ADMIN EDIT

Allowing the paste into the DateInput (and by extension date picker,...)  would have a lot of cases to control and that is why we have not yet enabled it. If the format is M/d/yyyy, for example, validation for numbers lower or equal to 12 would not be possible when the month is regarded. If the user pastes 8/2/2020 could mean two things - 8th of February 2020 or 2nd of August 2020. This might cause issues as the data that goes to the database might be incorrect and causing the application to misbehave.

That being said, how would you suggest handling the pasting of dates in the component. How would you like from us to handle the format difference of the dates? Please comment below.

---

Unplanned
Last Updated: 01 Sep 2020 14:00 by ADMIN
Created by: Roland
Comments: 0
Category: DateInput
Type: Feature Request
4

See https://docs.telerik.com/blazor-ui/components/dateinput/supported-formats#two-digit-year-formats

I am using a 4-digit format as workaround, but 2-digit formats are quite normal over here. That is why most tools and OS-es have cutoff years. Often a floating cutoff year that is 50 years before the current date. So anything below 70 would be 20xx. Or you can have a cutoff year close to a century ago, because you consider dates past more relevant than future dates. 

.NET has System.Globalization.TwoDigitYearMax.
Completed
Last Updated: 19 Jun 2019 10:54 by ADMIN
Release 1.2.0
Created by: Darren
Comments: 0
Category: DateInput
Type: Feature Request
9

Binding a date input or a date picker to a nullable value causes a build-time error

error CS1503: Argument 1: cannot convert from 'System.DateTime?' to 'System.DateTime'

Sample:

@using Telerik.Blazor.Components.Button
@using Telerik.Blazor.Components.DateInput

<TelerikDateInput bind-Value="@StartDate" Format="MM/dd/yyyy HH:mm:ss"></TelerikDateInput>

@functions {
    [Parameter]
    private DateTime? StartDate { get; set; } = new DateTime(2020, 1, 1);
}