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

Files from specific date in filepicker?

Hi all,

 

I'm working on an app that uses a filepicker where you can select a picture you took today(or if specified another date).  I've been playing arround with the filepicker and searching the forums for a few days now and was wondering whether it is possible to limit the results in file picker to a specified date.

 

It doesn't seem to be build in here: https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__filepicker.html

 

Or is there another easy way you would do this?

 

Thanks!

 

Titus

Don't forget to mark as solved and like my post if it helped out!
Retired
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Files from specific date in filepicker?

[ Edited ]

Hi ETitus, 

 

Have you tried using the filter property of the FilePicker API? You can filter the files based on this filter property.

 

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Files from specific date in filepicker?

You could sort by date, which would make it easier for the user to select a picture that was taken today, but it would not prevent them from picking one that wasn't, or help you if you want them to pick photos from arbitrary dates.

 

If you want to do that, you would probably need to build your own file picker type UI.

 

What's your use case? It may be worth logging a feature request: DIT

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 54
Registered: ‎05-14-2013
My Device: LE Z10
My Carrier: Ben(T-Mobile network)

Re: Files from specific date in filepicker?

Thanks for answering!
I did sort on the date yes, but if possible I would really like to show only pictures of today(or a date specified before pressing select picture). I will look into logging a feature request, thanks! 

 

@ sabdelsayed, I tried to work with the filter, but could only get it to filter out strings, like [*.png'] etc. Is there a syntax for selecting dates?

 

Thanks again!

 

 

Don't forget to mark as solved and like my post if it helped out!