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: 54
Registered: ‎05-14-2013
My Device: LE Z10
My Carrier: Ben(T-Mobile network)

Current date as maximum in QML

[ Edited ]

Dear Community,

 

I've been trying and looking through the forums for a solution in QML for this problem:

 

I have a DateTimePicker, where I want to use the maximum propperty, setting it to the current date, like: maximum: {new Date();}

Though I would like the picker to NOT DISPLAY dates after today, instead of just not allowing future dates by resetting them.

 

Any ideas?

 

Titus

Don't forget to mark as solved and like my post if it helped out!
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Current date as maximum in QML

I don't think there's a way to do it effectively with the standard picker. I'm intending to build my own calendar control, partly to resolve this.

(Another reason to do so is that I find the DateTimePicker incredibly awkward for selecting dates other than ones that are only a few days away from the starting point, and awkward even for those. It's a control with very poor usability, from a UI design point of view, as far as I'm concerned.)

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!