Changing calendar size in DateTimePicker

7 posts, 0 answers
  1. Jace
    Jace avatar
    9 posts
    Member since:
    Feb 2015

    Posted 17 May Link to this post

    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...

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 May Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jace
    Jace avatar
    9 posts
    Member since:
    Feb 2015

    Posted 20 May in reply to Yana Link to this post

    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.
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 24 May Link to this post

    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.
  6. Jace
    Jace avatar
    9 posts
    Member since:
    Feb 2015

    Posted 24 May in reply to Yana Link to this post

    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...

  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 25 May Link to this post

    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.
  8. Jace
    Jace avatar
    9 posts
    Member since:
    Feb 2015

    Posted 25 May in reply to Yana Link to this post

    #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...

Back to Top
UI for WPF is Visual Studio 2017 Ready