This is a migrated thread and some comments may be shown as answers.

Today and Close button

5 Answers 48 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 1
Veteran
Hans asked on 18 Feb 2019, 09:07 AM

Hello,

setting the TodayButtonVisibility of the RadDatePicker to Visible seems to hide the close button of the control.  Is there a way to have both buttons visible ?

Regards,
Hans

5 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 21 Feb 2019, 08:14 AM
Hello Hans,

The Close button is not available in RadDatePicker regardless of the today button visibility. To have both Close and Today buttons you can use the RadDateTimePicker control.
<telerik:RadDateTimePicker TodayButtonVisibility="Visible" />
I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Hans
Top achievements
Rank 1
Veteran
answered on 21 Feb 2019, 08:54 AM

Hi Martin,

thanks for the clarification.  The proposed solution (RadDateTimePicker) is no good for me unless there is a (easy) way to hide the time picker of the control.

Regards
Hans

0
Martin Ivanov
Telerik team
answered on 21 Feb 2019, 10:45 AM
Hello Hans,

To achieve your requirement you can extract the ControlTemplate of RadDatePicker and re-arrange it a bit. Basically, you can align the today button left or right, and include an additional close button. I've attached a small example showing how to do this. Can you please check it out and let me know how it goes? I've made changes in the Border element with x:Name="TodayButtonBorder".

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Hans
Top achievements
Rank 1
Veteran
answered on 25 Feb 2019, 12:14 PM

Hi Martin,

thanks for the sample project.  Unfortunately, I can't seem to get it to build.  I get following error messages and am unable to resolve them:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorThe tag 'Office_BlackTheme' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 8 Position 6. WpfApp28 D:\Downloads\WpfApp28\CustomDatePickerStyle_OfficeBlack.xaml8

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorThe tag 'RadTimePicker' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 13 Position 10. WpfApp28 D:\Downloads\WpfApp28\MainWindow.xaml13

Regards,
Hans


0
Martin Ivanov
Telerik team
answered on 27 Feb 2019, 09:53 AM
Hello Hans,

I've downloaded the project and my side and I was able to run it properly. Can you please double check if the reference Telerik assemblies on your side are all of the same version? Such errors appear usually when there is a mixture between different Telerik versions. 

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
DatePicker
Asked by
Hans
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
Hans
Top achievements
Rank 1
Veteran
Share this question
or