Telerik Forums
UI for WPF Forum
0 answers
14 views

Product: Telerik UI for WPF

Control: RadDatePicker (custom inherited as NewDatePicker)

Target Framework: .NET Framework 4.7

 

Issue Summary:

W're facing an inconsistency in behavior with the RadDatePicker control between development and test environments.

  • We have a custom control NewDatePicker that inherits from RadDatePicker.
  • At runtime, we bind a SelectedDate value (e.g., Jan 23, 2025) to the control.
  • When the user clicks to open the calendar popup:
    •   In development, the calendar popup correctly opens to SelectedDate.
    •   In test, the calendar popup opens to today's date (July 2025) instead of the bound SelectedDate.

 

Steps to Reproduce:

  1. Use a RadDatePicker or inherited control.

        2. Set SelectedDate = DateTime.Now.AddMonths(-6) (e.g., Jan 23, 2025).

        3. Run the application and open the DatePicker calendar.

        4. Observe the calendar view:

  •  Dev: shows January 2025 (as expected).
  •  Test: jumps to current date (July 2025), even though SelectedDate is Jan 23.

What We Tried:

  • Manually calling this.DisplayDate = this.SelectedDate.Value; inside OnPreviewMouseDown.
  • Using Dispatcher.BeginInvoke(..., DispatcherPriority.Loaded) to defer the update.
  • Accessing and setting PART_Calendar.DisplayDate explicitly.
  • Ensured that SelectedDate has a valid value.
  • Tried handling Loaded, OnApplyTemplate, and custom SyncDisplayDate() method.
  • Everything works well in development — but not in the test environment.


    Questions:
    1. Is there a recommended approach to ensure the calendar opens to the correct month consistently in all environments?

Note: In Test environment First time click that time its show the current Date secound time I click that time it show the expected output. 

 

  • the below the calendar need to show the 23 jan 2025 but its show current date.

Parthiban
Top achievements
Rank 1
 updated question on 24 Jul 2025
1 answer
11 views

I using the <telerik:RadDatePicker> 

 DisplayFormat = (Long or short) only there I need a customer format how we archive.

 

Example : 1 July 2025, 1 JUL 2025

Stenly
Telerik team
 answered on 14 Jul 2025
1 answer
39 views

Is it possible to have the RadCalendar inside the RadDatePicker and RadDateRangePicker to have a different theme than the RadDatePicker and the RadDateRangePicker?

I tried setting this within the RadDatePicker control's xaml:

<telerik:RadDateTimePicker.CalendarStyle>
    <Style TargetType="telerik:RadCalendar">
        <Setter Property="telerik:StyleManager.Theme"
                Value="Windows11" />
    </Style>
</telerik:RadDateTimePicker.CalendarStyle>

...but it has no effect.

Stenly
Telerik team
 answered on 12 Mar 2025
0 answers
59 views

When Static header are enabled and few columns are fixed, 
Scenario:


1.If the Start and End Dates range are more than 1 month, the data is not exactly aligned with the Header dates after scrolling towards right.

2.If filter is applied, then the footer is displayed at very bottom. 

sandurpoojitha
Top achievements
Rank 1
 asked on 02 Jul 2024
1 answer
149 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
289 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
97 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
140 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
122 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
248 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
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
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
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?