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

Java Development

Reply
Regular Contributor
Posts: 97
Registered: ‎04-19-2012
My Device: BB Torch-9800

How to set minimum date using DateTimePicker in blackberry

Hello All,

I dont want to display previous date in DateTimePicker. For that there is a function 'setMinimumDate' butby chance it's not working for me. It's restricted  only Year not Day & Month. Kindly provide me a best solution to doing the same.

 

Below are the code which i am currently using.

 

DateTimePicker dateTimePicker = DateTimePicker.createInstance(Calendar.getInstance(),null,"HH:mm");
Calendar calendar = Calendar.getInstance();
minDate
.set(Calendar.DAY_OF_MONTH,14);minDate.set(Calendar.MONTH,Calendar.FEBRUARY);minDate.set(Calendar.YEAR,2013);_datePicker.setMinimumDate(minDate);

Thnaks & Regards,

Ajay

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to set minimum date using DateTimePicker in blackberry

I'm obviously missing something here:

 

dateTimePicker.setMinimumDate(Calendar minCalendar)