Telerik Forums
UI for WPF Forum
1 answer
8 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
106 views
I would like to know if the WPF RadDatePicker control offers a built-in clear button functionality to remove the selected date.
Martin Ivanov
Telerik team
 answered on 29 May 2023
0 answers
50 views

If I use directly the control Telerik GridViewDataColumn, define the column grid like a Date (DataType="{x:Type sys:DateTime}"), when I click on the filed visualize correctly the Calendar.

But if I use the custom control from GridViewDataColumn when I do click appare this error:

System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'Telerik.Windows.Controls.RadDatePicker' sul tipo 'System.Windows.Controls.TextBox'.

Can you help me to resolve the problem?
Thank You.

Debora
Top achievements
Rank 1
 asked on 23 Dec 2022
2 answers
75 views

Hello,

I want to know if its possible to update Gantt Tasks when you change a Start Date or End Date from the Grid View part. For example, if I delay Proptotype Task, all the task behind should be delayed the same time as Prototype.

Leire
Top achievements
Rank 1
Iron
Iron
 answered on 01 Jun 2022
1 answer
69 views

Hi,

I used RadTimeSpanPicker, but I got a situation where I also needed a date.

So I want to use RadDateTimePicker as in the picture,

But with the RadTimeSpanPicker clock and not with the clock that RadDateTimePicker has.

I would be happy to help if this can be done and how

Thank you.

 






Dilyan Traykov
Telerik team
 answered on 21 Jan 2022
1 answer
130 views

I want to change DateTime.Now format like MM/dd/yyyy throughout application. so please help me out.

Thanks & Regards

Murugan M

Dilyan Traykov
Telerik team
 answered on 15 Oct 2021
1 answer
66 views

I edited the template of RadDatePicker, when i click the left and right button to change the month, the month component of date number is totally still, won't change by different month.

I found if DayButtonStyle part is deleted, then nothing wrong. But I need to change DayButtonStyle, is there any solution?

                    <telerik:RadDatePicker Style="{DynamicResource RadDatePickerStyle1}" IsEnabled="True" IsReadOnly="False" Margin="2 0"/>
<Setter Property="DayButtonStyle">
                            <Setter.Value>
                                <Style TargetType="{x:Type Calendar:CalendarButton}">
                                    <Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
                                    <Setter Property="FontSize" Value="12"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BasicFont}"/>
                                    <Setter Property="BorderThickness" Value="1"/>
                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    <Setter Property="VerticalContentAlignment" Value="Center"/>
                                    <Setter Property="MinWidth" Value="24"/>
                                    <Setter Property="MinHeight" Value="24"/>
                                    <Setter Property="FontWeight" Value="Normal"/>
                                    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type Calendar:CalendarButton}">
                                                <Grid x:Name="LayoutRoot" Background="Transparent">
                                                    <Border x:Name="BorderVisual" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="10" Margin="1"/>
                                                    <ContentControl x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Foreground="{TemplateBinding Foreground}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsFromCurrentView" Value="False">
                                                        <Setter Property="Opacity" TargetName="Content" Value="0.6"/>
                                                    </Trigger>
                                                    <Trigger Property="IsKeyboardFocusWithin" Value="True">
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="BorderThickness" TargetName="BorderVisual" Value="1"/>
                                                    </Trigger>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter Property="Background" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="Foreground" Value="White"/>
                                                    </Trigger>
                                                    <Trigger Property="IsSelected" Value="True">
                                                        <Setter Property="Background" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="Foreground" Value="White"/>
                                                    </Trigger>
                                                    <Trigger Property="IsEnabled" Value="False">
                                                        <Setter Property="Opacity" TargetName="Content" Value="0.6"/>
                                                    </Trigger>
                                                    <Trigger Property="ButtonType" Value="TodayDate">
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="Gray"/>
                                                        <Setter Property="Foreground" Value="{DynamicResource BasicFont}"/>
                                                        <Setter Property="FontWeight" TargetName="Content" Value="Bold"/>
                                                    </Trigger>
                                                    <MultiTrigger>
                                                        <MultiTrigger.Conditions>
                                                            <Condition Property="IsEnabled" Value="False"/>
                                                            <Condition Property="IsMouseOver" Value="True"/>
                                                        </MultiTrigger.Conditions>
                                                        <Setter Property="Foreground" TargetName="Content" Value="White"/>
                                                    </MultiTrigger>
                                                    <MultiTrigger>
                                                        <MultiTrigger.Conditions>
                                                            <Condition Property="IsFromCurrentView" Value="False"/>
                                                            <Condition Property="IsMouseOver" Value="True"/>
                                                        </MultiTrigger.Conditions>
                                                        <Setter Property="Opacity" TargetName="Content" Value="1"/>
                                                    </MultiTrigger>
                                                    <MultiTrigger>
                                                        <MultiTrigger.Conditions>
                                                            <Condition Property="ButtonType" Value="TodayDate"/>
                                                            <Condition Property="IsMouseOver" Value="True"/>
                                                        </MultiTrigger.Conditions>
                                                        <Setter Property="Foreground" TargetName="Content" Value="White"/>
                                                        <Setter Property="Background" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                    </MultiTrigger>
                                                    <MultiTrigger>
                                                        <MultiTrigger.Conditions>
                                                            <Condition Property="ButtonType" Value="TodayDate"/>
                                                            <Condition Property="IsSelected" Value="True"/>
                                                        </MultiTrigger.Conditions>
                                                        <Setter Property="Background" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="BorderBrush" TargetName="BorderVisual" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="Foreground" Value="White"/>
                                                    </MultiTrigger>
                                                    <Trigger Property="ButtonType" Value="WeekNumber">
                                                        <Setter Property="Foreground" TargetName="Content" Value="{DynamicResource BasicFont}"/>
                                                        <Setter Property="Opacity" TargetName="Content" Value="0.2"/>
                                                        <Setter Property="Visibility" TargetName="BorderVisual" Value="Collapsed"/>
                                                    </Trigger>
                                                    <Trigger Property="ButtonType" Value="WeekName">
                                                        <Setter Property="Foreground" TargetName="Content" Value="{DynamicResource BrightColor}"/>
                                                        <Setter Property="Visibility" TargetName="BorderVisual" Value="Collapsed"/>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </Setter.Value>
                        </Setter>
I can't pick the rignt date.  T - T

Stenly
Telerik team
 answered on 28 Sep 2021
0 answers
169 views

Hello,

I have some troubles for getting the RadDatePicker working as expected, while using the propertiy 'DisplayDateStart'. Here my code:

At the start, when I select a date from the first RadDatePicker (valid from), the other one is working correctly (see the ok.png). But if I choose another date (minor to the previous one) some date are still greyed out on the second control (Valid To, see the not_ok.png --> the date 1,2,3,4,5 cannot be selected). I'm not able to reproduce the same error on the other side, changing the valid to control. 

 

Edit:

I found that these controls inherit implicity from a style that has:

        <Setter Property="SelectableDateStart"
                Value="{StaticResource MinimumAllowedDate}" />
        <Setter Property="DisplayDateStart"
                Value="{StaticResource MinimumAllowedDate}" />

where MinimunAllowedData is equal to     <system:DateTime x:Key="MinimumAllowedDate">1/1/1900</system:DateTime>

Removing the SelectableDateStart solve the issue. Still not sure why is this behavior happening?

If I change the control in this way

I still get the error.

 

Are you aware of this behaviour? Or am I missing something? Thank you.

Massimo
Top achievements
Rank 1
 updated question on 26 May 2021
1 answer
113 views

Hi,

Im using RadDatepicker for from date and to date, In from date, im using DisplayDateEnd as ValidTo and in to date, im using DisplayDateStart as ValidFrom, its works fine based on the date selection of valid from and valid to, but how can i see the dates which are not visible.

I want to see the dates in calender with disabled mode of past and future dates.

Thanks,

Karthick.

Dilyan Traykov
Telerik team
 answered on 22 Mar 2021
5 answers
747 views

How can I set the RadDateTimePicker selected value to current date?

I have a form for adding new record with RadDateTimePicker binded to DateTime? datatype. Since this is for new record, the expected datetime value is NULL.

How can I set the RadDateTimePicker selectedvalue to current date on form load and not NULL/Empty. 

 

Thanks you.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Sep 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?