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

Reply
Highlighted
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!
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!