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
Developer
ETitus
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!
Please use plain text.
Developer
peter9477
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!
Please use plain text.