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

Close day, month, year selection loops/columns?

3 Answers 54 Views
DatePicker and DateSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 07 Mar 2012, 08:14 PM
Is there a way to programatically force the RadDatePicker to close the day, month, and year selection "loops" (columns of numbers)? If you click on the day, month, or year button the related loop/column will appear. However, if you then tap the done button to close the selector popup the next time you open the popup the loop/column will still be visible. I would like the selector popup to start with the loops/columns closed. It looks cleaner that way. Let me know if this is possible.

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 09 Mar 2012, 09:33 AM
Hi John,

Currently this is the default behavior of the control and there is no way to change it.

We will consider the case however, and will try to update the behavior to be comparable to that of the native Date- and TimePicker controls on the Windows Phone OS.

Let me know in case you have further questions or need assistance.

Regards,
Deyan
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Trung
Top achievements
Rank 1
answered on 05 Apr 2013, 09:42 AM
Hi Deyan, 

Is there any update on this issue? I have a DateSelector in my app. It keeps its previous status with the Date/Month/Year loops visible every time it is shown. Is there any way to "reset" the control to close the selection loops?
0
Deyan
Telerik team
answered on 09 Apr 2013, 07:36 AM
Hello Trung,

You can use the following workaround to overcome this behavior:

private void radDatePicker1_PopupClosed(object sender, System.EventArgs e)
{
    RadPickerBox pickerBox = ElementTreeHelper.FindVisualDescendant<RadPickerBox>(this.radDatePicker1);
    FrameworkElement popupContent = pickerBox.PopupContent as FrameworkElement;
    Telerik.Windows.Controls.RadDateSelector selector = ElementTreeHelper.FindVisualDescendant<Telerik.Windows.Controls.RadDateSelector>(popupContent);
 
    foreach (DateTimeList list in ElementTreeHelper.EnumVisualDescendants(selector, obj => obj is DateTimeList))
    {
        list.IsExpanded = false;
    }
}

Let me know if you have further questions or need assistance.

All the best,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DatePicker and DateSelector
Asked by
John
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Trung
Top achievements
Rank 1
Share this question
or