Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none
Accepted Solution

Avoid limits on DateTimePicker or your app may be rejected

I had an app rejected during basic testing because of reported mysterious behaviour in a DateTimePicker.

 

I am testing your app on the Dev Alpha. When I try to add a [...removed...] data, I can't change the date as it’s scrolling randomly by itself.

 

This made little sense to me since it's not like we have any direct control over something like that, so I questioned whether it was because he'd been testing while plugged in (the charger can affect the touch screen on Dev Alphas), or was running a different OS version, with bugs.

 

Then I realized he was trying to enter a date later than today. I made the "mistake" of using the minimum and maximum properties to constrain the entered date between 1970 Jan 1 and the current date/time.

 

He was certainly trying to just spin the date or time to a future point, and if you do that when today is the limit (set by "maximum: new Date()" in QML), you'll see a brief pause and then the DateTimePicker will spin itself back to the limit.

 

As there's no visual feedback to tell the user ahead of time that they're going "out of bounds", I'd consider this a usability design flaw in the control.  (And that's one reason to post this here.)

 

If you're planning something similar, considering removing the limit for now just to avoid the hassle of a rejection, and because your users might also be puzzled when they encounter this.

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Avoid limits on DateTimePicker or your app may be rejected

Following up...

I was prepared to release an update with the limit removed, but first I replied to the email from the tester, pointing out what I believed the "problem" was.

Just over a day later, the app is approved. Conclusion: for now it's an education issue...

I plan to do an update with unrelated improvements soon anyway, and I think I'll take out the restriction and replace it with a simple warning to the user (subtle, not a popup) if a future date is selected. The usability of the "limits" feature in DateTimePicker is questionable as it's currently implemented.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!