Telerik Forums
UI for Blazor Forum
1 answer
40 views

I have a TelerikTimePicker component and I have set the ShowClearButton="true". The Value property of the component is bound to a nullable DateTime variable (e.g., DateTime? MyTime). If I first input/select a valid time and then clear the value (using the "x" button in the input field), the component is highlighted in red because the .k-invalid class has been added to the HTML markup. However, the value in the TelerikTimePicker is not actually invalid because a null value is allowed.

This is very similar to this issue for the TelerikDateTimePicker: https://feedback.telerik.com/blazor/1660917-datetimepicker-should-not-get-red-border-when-bound-to-nullable-datetime-and-the-input-is-empty

Dimo
Telerik team
 answered on 08 May 2025
2 answers
56 views

Hello
I want to write a desired text instead of calendar numbers.
For example, as specified in the attached file, I want to write the desired text (8 day of month) instead of the number 8.
I tried through the event:
OnCalendarCellRender="@OnCalendarCellRenderHandler"
but I did not get the result.
Please help me.

 

Mohamad Javad
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Jan 2025
1 answer
45 views

Hello
I want to display the desired text in the DatePicker after selecting the date from TelerikDatePicker.
Currently, after selecting the DatePicker, the date is displayed in this field, to which I want to add the desired text.
For example, in the DatePicker field after selecting the date, instead of
07/01/2025
, today is 07/01/2025.

If it is not possible to change the text, at least no text should be displayed in the DatePicker after selecting the date.

Please help me.
Code and image:

 


<TelerikDatePicker @bind-Value="DatePickerValue" >
</TelerikDatePicker>

@code {
	private DateTime DatePickerValue { get; set; } = DateTime.Today;
{

Hristian Stefanov
Telerik team
 answered on 08 Jan 2025
0 answers
73 views

Hi, here's the scenario.

The time picker defaults to 0:00:00 <TimeOnly>:

 <TelerikTimePicker ID="txtPlayStart"
 @bind-Value="Value.playStart"
 Format="H:mm:ss"
 T="TimeOnly"
 ShowClearButton="true"/>

the user enters a time, saves it, all is well.

He realizes later he entered a bad time and wants to clear it.

He clicks the clear button, and saves it.

Imagine his surprise when nothing changes?

clear doesn't set it back to the default of 0:00:00?  there's a visual cue for the user (control is in red), but forcing them to enter 0:00:00 is not really appropriate?

Furthermore, if I catch the OnChange event, it fires when the user clicks the clear button, and it says the time is what it was before the user clicked clear. :/

I'm using the 7.1.0 that just came out yesterday.

I'm coming to realize that many of the Telerik Blazor components are pretty "bare bone" and some some sort of developer wrapper is required to make them user friendly.  (Except for "big" ones like the grid.)  Is that intentional?

I'm not seeing a way around this short of using the code and building my own custom version that I then have to keep up to date with every new release?

Thanks,

Charles

Charles
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 17 Dec 2024
1 answer
74 views

Hi, my goal is validate a form and focus telerik widget with validation errors.  

 

Now i can find the element search for class "k-invalid" but how to get the widget reference so i can call the FocusAsync() method?

 

Thanks

1 answer
91 views

When clearing a nullable DateTime-bound TimePicker control (by highlighting the value and hitting delete), why does the control leave the "AM" and also border itself in red?

Is there a way configure the TimePicker control so it doesn't do this?

 

Hristian Stefanov
Telerik team
 answered on 24 Oct 2023
1 answer
89 views

Hello,

I see there is no way to set TimePicker header in the modal of Telerik UI for Blazor component. The default implementation is not very usable in many situations and I would really like to have my own text and logic there. Is it possible to add it there somehow or how should I proceed?

Hristian Stefanov
Telerik team
 answered on 28 Sep 2023
0 answers
117 views
In the TimePicker, once the control is activated, Is there a way to show leading zeros in the hour and minute dropdowns/columns?
Walter
Top achievements
Rank 1
 asked on 19 May 2023
1 answer
118 views

I am trying to create a break time control using the Telerik Grid and Timepicker controls.  I set the break start values Min is the schedule series start time. and Max is the schedule series end time.  So setting the break start timepicker Min and Max properties correlate to this schedule time frame to keep the break time within the bounds of the schedule. 

When I set break end I want the range in the timepicker to reflect break start to schedule end.  For example:

I have a schedule that starts at 0600 and ends at 1430. 

My first break I choose the start time 0800 from the range of 0600 to 1430.  I want to set the break end time to be chosen from a range of 0800 to 0900. In the image the Break End shows the time range of 0600 to 1430...  So basically I want to have the break end range be from the break start time set.

in short

  • When adding a new Break, the START time should pre-populate with the Scheduled Events actual starting time.  Example: First Shift is from 7:00 AM to 2:30 PM.  When adding a new Break, the start time should pre-populate as 7:00 AM.
  • When you add a new Break and change the START time, it should automatically adjust the END time to at least the same START time + 15 or 30 or xxx minutes.

 

I have tried using the events for the Timepicker to help with this, but I can never get it to update.  Is there a way to achieve this? 

Razor code:

<TelerikGrid Data="@Appointment.Breaks"
	EditMode="GridEditMode.Inline"
	OnCreate="@CreateHandler"
	OnDelete="@DeleteHandler"
	OnUpdate="@UpdateHandler" 
	>
	<GridToolBar>
		<GridCommandButton Command="Add" Icon="add">Add</GridCommandButton>
	</GridToolBar>
	<GridColumns>
		<GridColumn Field="Description" Title="Description" FieldType="@typeof(string)" Width="50%" />
		<GridColumn Field="BreakStart"  Title="Break Start" FieldType="@typeof(DateTime)" DisplayFormat="{0:hh:mm:ss tt}" Width="150px">
			<EditorTemplate>
				@{
					var BreakToEdit = context as Break;

					<TelerikTimePicker Format="hh:mm:ss tt"
						           @bind-Value="@BreakToEdit.BreakStart"
							   Id="timepickerstart"
							   DebounceDelay="@DebounceDelay"
							   Min="@Min" 
							   Max="@Max">
						<TimePickerSteps Minute="5"/>
					</TelerikTimePicker>
				}
			</EditorTemplate>
		</GridColumn>
		<GridColumn Field="BreakEnd" Title="Break End" FieldType="@typeof(DateTime)" DisplayFormat="{0:hh:mm:ss tt}" Width="150px" >
			<EditorTemplate>
				@{
					var BreakToEdit = context as Break;

					<TelerikTimePicker Format="hh:mm:ss tt"
							   @bind-Value="@BreakToEdit.BreakEnd"
							   Id="timepickerend"
							   DebounceDelay="@DebounceDelay"
							   Min="@Min"
							   Max="@Max" >
							<TimePickerSteps Minute="5"/>
					</TelerikTimePicker>
				}
			</EditorTemplate>
		</GridColumn>
		<GridCommandColumn Width="100px">
			<GridCommandButton Command="Edit"   Icon="edit"></GridCommandButton>
			<GridCommandButton Command="Save"   Icon="save" ShowInEdit="true" ></GridCommandButton>
			<GridCommandButton Command="Delete" Icon="delete"></GridCommandButton>
			<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true"></GridCommandButton>
		</GridCommandColumn>
	</GridColumns>
</TelerikGrid>

Tsvetomir
Telerik team
 answered on 17 Apr 2023
0 answers
103 views

Is there a way to force adaptive rendering ?

We have a blazor app inside a maui build, and when built for windows app, it does not trigger adaptive rendering at the size we need.

Is there a way to force adaptive rendering on, or configure when it will switch ?

 

Richard
Top achievements
Rank 1
 asked on 16 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?