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

[Solved] DatePicker in a Popup

4 Answers 145 Views
DatePicker for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gianni
Top achievements
Rank 1
Gianni asked on 06 Sep 2012, 11:46 AM
Hello.
In the app I'm currently developing, I need to show a DatePicker in a custom Popup with Flyout-like behavior.

This custom Flyout control is just a Popup control with a custom style/template.
It's defined in XAML and it can be shown by clicking on an AppBar button.
It has a LightDismissable behavior, so it can be closed either by pressing an OK button or by clicking/tapping outside its window.
In addition to the OK button, the flyout contains a DatePicker.

Everything works well if the DatePicker Selector popup is closed using its buttons or by tapping/clicking outside it, but INSIDE the parent Flyout control.
Otherwise, if the DatePicker Selector popup is closed by tapping/clicking OUTSIDE both its window and the parent Flyout control, it doesn't work anymore: re-opening the Flyout, and clicking/tapping the DatePicker, the Date Selector is not shown anymore.

Did someone have a similar issue?

Thank you!
Gianni RG

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 11 Sep 2012, 12:12 PM
Hello Gianni,

 Thank you for reporting us this issue. It seems that it has something to do with our internal logic for dismissing the DatePicker popup. I have logged it and we will look into it and come with a solution in one of the upcoming releases. 

Please excuse us for the inconvenience caused.

P.S. I have also updated your telerik points.

Regards,
Tsvyatko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Gianni
Top achievements
Rank 1
answered on 15 Sep 2012, 10:29 AM

Hello,
using the new release of the Metro Controls, the Selector Popup showing issue on re-tapping the DatePicker has been solved. Thank you!

Now I'm experiencing another strange behavior:
when closing the DatePicker Selector popup (either by tapping outside it or by using its buttons), for a short period of time (a few milliseconds) it moves from its current position (lower-right border of the screen, just above the AppBar and a button) to the upper-left border of the screen, and then it closes.

Is it something related to the internal dismissing logic?

Thank you!
Gianni RG

0
Georgi
Telerik team
answered on 17 Sep 2012, 03:13 PM
Hi Gianni,

Thank you for getting back to us and for your question.

The behavior you describe is due to the fact the Popup by default uses Transition to get displayed - the predefined PopupThemeTransition. When it closes the Transition is played and it causes the visual artifacts that you are seeing.

We have our own internal logic to close the Popup and it does not rely on the IsLightDismissEnabled property. This however causes some undesired behavior of the component - for example when it resides in a ViewBox and I have just performed some tests with the built-in automatic closing via the light dismiss routine. Now the behavior is slightly different in your scenario - if you have the DatePicker popup displayed within another popup and you tap outside the root Popup then ONLY DatePicker popup gets closed, leaving the root one opened and you will need one additional Tap to close it.

This however is the default nested Popups behavior and how Microsoft has imagined it, so we will have to stick to this UX.

As I mentioned in my reply to another DateTime picker issue you found, we will prepare an internal build where the new "light-dismissable" Selector will be present and you will be able to play with it and give us your feedback on how it goes.

I hope this information is useful. Let me know if I can assist you in some other way.

Greetings,
Georgi
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Gianni
Top achievements
Rank 1
answered on 18 Sep 2012, 05:38 PM
Hello Georgi,
with the latest uploaded build, the strange behavior issue has been resolved. The DatePicker selector now behaves as you reported, without moving in the upper-left corner anymore. 
Thank you!

Gianni RG
Tags
DatePicker for XAML
Asked by
Gianni
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Gianni
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or