Completed
Last Updated: 03 Oct 2019 11:42 by ADMIN
Release R3 2019 SP1 (LIB 2019.3.1007)
Frank
Created on: 04 Sep 2019 13:08
Category: DateTimePicker
Type: Bug Report
1
RadDateTimePicker: sizing grip is missing after changing the CalendarSize from a larger value to a smaller one

Please refer to the attached sample project and follow the steps illustrated in the attached gif file.

Workaround: initialize a new RadDateTimePicker every time you toggle the checkbox:

    Dim location As Point
    Sub New()

        InitializeComponent()
        location = Me.RadDateTimePicker1.Location 
    End Sub
    Private Sub RadCheckBox1_ToggleStateChanged(sender As Object, args As Telerik.WinControls.UI.StateChangedEventArgs) Handles RadCheckBox1.ToggleStateChanged
        Me.Controls.Remove(Me.RadDateTimePicker1)

        Me.RadDateTimePicker1 = New RadDateTimePicker()
        Me.RadDateTimePicker1.Parent = Me
        Me.RadDateTimePicker1.Location = location
        With RadDateTimePicker1
            Dim i_calendar As RadDateTimePickerCalendar = TryCast(.DateTimePickerElement.GetCurrentBehavior(), RadDateTimePickerCalendar)
            If i_calendar IsNot Nothing Then
                If args.ToggleState = Telerik.WinControls.Enumerations.ToggleState.On Then

                    i_calendar.ShowTimePicker = True
                    i_calendar.DropDownMinSize = New Size(450, 350)
                    i_calendar.DropDownMaxSize = New Size(450, 350)
                    .DateTimePickerElement.CalendarSize = New Size(450, 350)
                    .CustomFormat = "dd.MM.yyyy HH:mm" 
                Else
                    i_calendar.ShowTimePicker = False

                    i_calendar.DropDownMinSize = New Size(250, 250)
                    i_calendar.DropDownMaxSize = New Size(250, 250)
                    .DateTimePickerElement.CalendarSize = New Size(250, 250)
                    .CustomFormat = "dd.MM.yyyy"
                End If 
            End If
        End With 
    End Sub

0 comments