How to remove placeholder from DatePicker?
If I set DateFormat to "d" then DatePicker will have "d" as a placeholder which confuses my users. How can I set custom placeholder or remove the placeholder from the DatePicker control?
Best regards,
Robert
I would like the following behavior in the date picker. Perhaps it can be achieved with a parameter similar to the one in UI for ASP.NET AJAX - the FocusedDate property (something like RadDatePicker1.FocusedDate = DateTime.Today.AddDays(30);).
The current behaviour is:
* if date is set, show month of set date
*else show month of current date (today)
Desired behaviour:
* if date is set, show month of set date
* else if min date's month is greater than current date month then show month of min date
* else show month of current date
Here is a code snippet to illustrate the issue:
Open the picker - it will start in the month with today's date, but I want it to start at the min date - one month later
<TelerikDatePicker @bind-Value="@theDate" Min="@minDate" Max="@maxDate"></TelerikDatePicker>
@code {
DateTime theDate = DateTime.Now;
DateTime minDate = DateTime.Now.AddDays(60);
DateTime maxDate = DateTime.Now.AddDays(230);
}
===
Hello,
I have an issue with TelerikDatePicker globalization. It works fine at all, but "Today" has the same translation.
I've used code like this:
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(MyStringLanguage);
And it still works only for "days" and "months". Could you please tell about current situation about localization and globalization or maybe to suggest some different solution.
Thanks for your help.
Many users would prefer to not have to use their mouse when entering data. This makes their job much more efficient when they can keep their hands in one place. I would expect to be able to type "05/22/2020" and also "05222020" into the datepicker but it keeps getting stuck on the day part. If you look at the demo for MVC, when you type those values, it accepts them but the demo for the Blazor datepicker does not.
ADMIN EDIT:
The MVC date picker does not have the described behavior. By default it is a simple <input> without validation so it will take any input, but typing in the numbers in sequence like that won't select a date. See the rest of the discussion and the updated title for more details on the behavior and issue this will fix.
</ADMIN EDIT>
To reproduce, go to https://demos.telerik.com/blazor-ui/datepicker/overview and tab into the datepicker input. Try typing "05/22/2020" and you will get a result of "5/20/yyyy" because it gets stuck on the dd section.
To see the expected functionality, go to the MVC demo site (https://demos.telerik.com/aspnet-mvc/datepicker) and tab into the datepicker. Try typing "05/22/2020" and you will get a value of "05/22/2020" which is what it should be.
This should work when typing both "05/22/2020" and "05222020" since users will be even more efficient if they don't need to type the /.
When attempting to insert a date of February 29th (2/29) in the DatePicker component with the AutoCorrectParts feature disabled, users are unable to input the year. The component only allows the insertion of the digits 0, 4, and 8, preventing users from selecting other year values.
Reproduction: https://blazorrepl.telerik.com/mxagmaPm39IQbjHw19
Delete the input, choose a date from the dropdown. The issue is that the first picker remains invalid, while it is valid, a keyboard interaction with the input is required to clear the invalid state.
Reproducible:
@using System.ComponentModel.DataAnnotations;
<EditForm Model="ModelData">
<DataAnnotationsValidator />
<ValidationSummary />
<br /><br />
<span>Not nullable</span> @ModelData.Date<br />
<Telerik.Blazor.Components.TelerikDatePicker @bind-Value="ModelData.Date" Min="DateTime.MinValue" Max="DateTime.MaxValue"></Telerik.Blazor.Components.TelerikDatePicker><br /><br />
<span>Nullable</span> @ModelData.Date2<br />
<Telerik.Blazor.Components.TelerikDatePicker @bind-Value="ModelData.Date2" Min="DateTime.MinValue" Max="DateTime.MaxValue"></Telerik.Blazor.Components.TelerikDatePicker><br /><br />
</EditForm>
@code {
public MyModel ModelData { get; set; }
protected override void OnInitialized()
{
ModelData = new MyModel();
}
public class MyModel
{
public string Name { get; set; }
[Required(ErrorMessage = "Non nullable required")]
public DateTime Date { get; set; } = DateTime.Today;
[Required(ErrorMessage = "Nullable required")]
public DateTime? Date2 { get; set; } = DateTime.Today;
}
}
Hi
When you focus on the DatePicker input element the cursor is at the end of the input instead of the start.
Here is an example
https://blazorrepl.telerik.com/ccOtaTOZ59tdXv1J10
Any help would be appreciated
Regards
Stewart
Ideas that would serve me:
Steps to reproduce
<Admin>
As a workaround, you can add the DebounceDelay parameter with a high number as in this REPL link.
</Admin>
====
Hi
I have created a REPL here: https://blazorrepl.telerik.com/QHYGbTPk59IqOcEU51
to reproduce the issue I am talking about:
you will notice that the value displayed below the table is what was previously in the cell
I would have expected the value to be null which can be achieved via
The problematic setup:
<TelerikDatePicker Min="@Min"
Max="@Max"
@bind-Value="@selectedDate">
</TelerikDatePicker>
@code {
public DateTime Max = new DateTime(2021, 3, 29);
public DateTime Min = new DateTime(2021, 3, 1);
private DateTime? selectedDate;
}
Hi,
disabled dates are not working in DatePicker. When setting DisabledDates parameter nothing changes in DatePicker. Those dates can still be selected. It works as expected in Calendar control