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

Changing calendar size in DateTimePicker

6 Answers 1111 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Jace
Top achievements
Rank 1
Jace asked on 18 May 2016, 03:21 AM

I've been trying to change the size of the calendar in the DateTimePicker. Most likely a larger font size of the calendar is what's needed.

I tried following the following link, but could not get the theme to work.  http://www.telerik.com/forums/how-to-easily-change-font-size

Any help is appreciated.

Thanks...

6 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 20 May 2016, 11:51 AM
Hi John,

You could set properties of RadCalendar inside RadDateTimePicker through the CalendarStyle property and of the RadClock with RadClockStyle property. Here is a quick example how to set the FontSize:

-first define the Styles inside the Resources:

<UserControl.Resources>
    <Style TargetType="telerik:RadCalendar" x:Key="CustomCalendarStyle">
        <Setter Property="FontSize" Value="20" />
    </Style>
    <Style TargetType="telerik:RadClock" x:Key="CustomClockStyle">
        <Setter Property="FontSize" Value="20" />
    </Style>      
</UserControl.Resources>

then set them to the DateTimePicker:

<telerik:RadDateTimePicker Width="200"
    CalendarStyle="{StaticResource CustomCalendarStyle}"
    ClockStyle="{StaticResource CustomClockStyle}"/>

I hope this helps.

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jace
Top achievements
Rank 1
answered on 20 May 2016, 05:40 PM
Thanks Yana. That definitely solves that problem. One more question. Do you folks have any style examples for the clock portion? We really do not like that type of layout.
0
Yana
Telerik team
answered on 24 May 2016, 11:22 AM
Hi John,

I cannot suggest any styling examples, but if you could give us more details on the expected look, we will help with the implementation.

Additionally, you could set the clock items displayed inside RadClock as shown in the following topic:
http://docs.telerik.com/devtools/wpf/controls/raddatetimepicker/features/clock-items

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jace
Top achievements
Rank 1
answered on 25 May 2016, 03:14 AM

To make the DateTimePicker control usable for our client, it would need to do two things.

1) We need the textbox portion to NOT validate when the control loses focus. If a user type in the TextBox, "67 Chevelle", it should stay that way. We want the database to do any and all validation. Now if the user picks a date and/or time, it would use a specific format we supply, but if a user types any value in the TextBox, it should stay as is.

2) We need to have a calendar layout like one seen in the attachment. It should be able to be placed at the side (as shown) or at the bottom. It would be able to scroll with a single column, or two column, etc. The values would be dictated as they are now.

Thanks...

0
Yana
Telerik team
answered on 25 May 2016, 02:23 PM
Hi John,

Straight to your questions:

1. RadDateTimePicker works only with DateTime objects, so it will not be possible to preserve the entered text when it loses the focus. It provides the option to implement custom parsing, however the parsed value should be of DateTime type.

2. I have just replied to the other forum thread regarding this question, please check it at the following link:
http://www.telerik.com/forums/single-column-clock-with-vertical-scrollbar

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jace
Top achievements
Rank 1
answered on 25 May 2016, 09:19 PM

#1 makes sense and we can parse with a custom default value based on user input.

#2 (per the other thread) works great and as I expect.

I used Telerik products for a different contract back in 2007 with great results. The reason I recommended Telerik again for this contract is because of the fantastic support.

Thanks for the help and guidance.

Jace...

Tags
DateTimePicker
Asked by
Jace
Top achievements
Rank 1
Answers by
Yana
Telerik team
Jace
Top achievements
Rank 1
Share this question
or