Telerik Forums
UI for WPF Forum
1 answer
77 views

I am using DateTimePicker on WPF and I would like to know if there is a way to modify the bacjgroud color of the DateTimePicker for a couple of dates.

 

Thank you in advance.

Stenly
Telerik team
 answered on 16 Sep 2024
0 answers
55 views

Hi!  I am seeking assistance with this column in WPF, in a RadGridView:

<telerik:GridViewDataColumn DataMemberBinding="{Binding TargetDateET, StringFormat={}{0:MM/dd HH:mm}}" Header="Target Date" />

It displays DateTime values in the grid in the following format: "MM/dd HH:mm"

The issue is that the FilterDescriptor is in this format: "MM/dd/yyyy HH:mm:ss tt"

And when the filters are saved and presented to the user, they are different.



What I can do to manage this data in the same format? (Without having to generate a new variable that is a string and that returns the correct format) Help! Thanks in advance! Juan

Pablo
Top achievements
Rank 1
 updated question on 03 Jul 2024
1 answer
146 views

Hello,

How can I change the header button text color and the week number text color (see attachment)?

Kind regards

 

Stenly
Telerik team
 answered on 18 Mar 2024
1 answer
132 views

Hi


I use the RadDateTimePicker and have a button ("Next"):

When now the user changes the date/time value to an invalid date/time an error is shown:

When the user clicks on the "Next" button the DateTimeText disapears and is empty and an error is schown:

My Question:
Is it possible to set the DateTimeText to the previous wrong formatted date/time (120000000000.07.23 08:49) like this ? 

I have tried to overload the method  OnParseDateTime and set the CurrentDateTimeText but it's not working.

Dinko
Telerik team
 answered on 13 Jul 2023
0 answers
229 views

Hi. 

I've tried to use RadDateTimePicker inside RadGridView, but datepicket is not showing (examle from: WPF DateTimePicker - How to use RadDateTimePicker in a Grid - Telerik UI for WPF).  Tried to add control outside grid but without any effect. 

Project is referenced to Telerik.Windows.Data.dll, Telerik.Windows.ControlsTelerik.Windows.Controls.InputTelerik.Windows.Controls.GridView...


<Window x:Class="Test"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"         
        Title="Test" Height="450" Width="800">
    <Grid>
    
        <telerik:RadDateTimePicker                                 
                                InputMode="DatePicker"
                                telerik:DropDownButtonExtensions.FocusContentOnOpen="True"                              
                                SelectedValue="{Binding Established, Mode=TwoWay}"/>
        
        <telerik:RadGridView Name="radGridView" 
                     AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" 
                                    DataMemberBinding="{Binding Name}" />
                <telerik:GridViewDataColumn Header="Established" 
                                    DataMemberBinding="{Binding Established}">
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadDateTimePicker                                 
                                InputMode="DatePicker"
                                telerik:DropDownButtonExtensions.FocusContentOnOpen="True"
                              
                                SelectedValue="{Binding Established, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Stadium" 
                                    DataMemberBinding="{Binding StadiumCapacity}" 
                                    DataFormatString="{}{0:N0}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

Michał
Top achievements
Rank 1
 asked on 06 Apr 2023
0 answers
197 views

Hello, 

I created a new template for the RadDateTimePicker because I overrided the Clock Part.

As part of the changes I added a Tooltip which shows the date time if not null. In the Watermark control part of the template I show the SelectedValue property that is bound to the ViewModel - TwoWayBinding. The string format of the DateTime is full date: dd/MM/yyyy with full time: HH:mm:ss. So I see the parsed Text on the control. 

I can't find an easy way to show the tooltip in the same format as the display date. I can't set the Tooltio content to RelativeSource Path=SelectedValue because it shows the DateTime in orginal format.

I also can't show in the Tooltio the DisplatText because even if binding OneWay, the date is flickering in every change like binding is wrong.

In the Style of the RadDateTimePicker I have access to SelectedValue, SelectedDateTime,SelectedTime properties but it seems that you convert the Date Time to a text inside the control code because it doesn't work on the Tooltip.

 

Do you have any solution for that?

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 08 Feb 2023
1 answer
111 views

Hello:

About the RadDateTimePicker,

when I set the telerik:ValidationErrorTemplateHelper.ShowWhenFocused = "True"

It only doesn't work on Theme="Expression_Dark".

The others themes seems no problem.

Masha
Telerik team
 answered on 08 Dec 2022
3 answers
204 views

Hello,

I am insterested on change the RadDateTimePicker.

1. When set the control to change the minutes/seconds, the default control template shows all the possible options in buttons, a little bit annoying for the user.

The request: like Android, the user wants three numbers (hour, minute, seconds) that he can move up/down. Instead of scrolling we can use up/down arrows.

2. Add a button in the control to change 12/24 format and visibilty property for this button.

Questions:

1. Which approach do you suggest?

Override all the TimeControl template? or update tue default style ?

2. Which properties should I bind in case that I override the TimePicker to create a new template with three up down controls where each control will handle hours/minutes/seconds ?

3. Do you have any control that can set the number value with up down like Android (see attached picture)

4. For point 2, how can I add a control that will be set the date time format off the original RadTimePicker? 

I am not sure that creating a new custom control which contains the new control and telerik control will be the best approach. I want to add the control to the original one in the style.

5. Which property should be set to show 24 format. In the example you are showing a property that doesn't update the time correctly.

6. Do you have advanced examples with many styles and changes on Control Template ?

All the examples on the site are quiet simple, maybe did you get from users new examples.

 

Thanks,

This forum is so helpful.

 

Masha
Telerik team
 answered on 24 Nov 2022
0 answers
206 views

I have used DateTimePicker with selectable date start and end, when binding the selected date with two way mode and entering the earlier date manually I am getting below error. Any idea?


<telerik:RadDateTimePicker x:Name="cmbDatePicker"
                            InputMode="DatePicker"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Width="250" 
                            Height="30"
                            IsInputRestrictedToSelectableDates="True"
                            SelectableDateStart="{Binding SelectableDateStart}"
                            SelectableDateEnd="{Binding SelectableDateEnd}"
                            SelectedDate="{Binding ScheduledDate, Mode=TwoWay}"
                            />

 

Sathya
Top achievements
Rank 1
 updated question on 11 May 2022
4 answers
58 views

I updated our telerik to the latest NoXaml version of the libraries.

 

I get the following binding error:

Cannot find source for binding with reference 'ElementName=TodayButtonBorder'. BindingExpression:Path=CornerRadius; DataItem=null; target element is 'RadButton' (Name='TodayButton'); target property is 'CornerRadius' (type 'CornerRadius')

I think this is a problem within the DateTimePicker control. I don't have any controls by the name 'TodayButton'.

 

Can someone from telerik flag this as a problem?

Max
Top achievements
Rank 1
Veteran
Iron
 answered on 16 Mar 2022
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?