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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Regular Contributor
erAjayGoyal
Posts: 91
Registered: ‎04-19-2012
My Carrier: 7842703006

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

Please use plain text.
Developer
peter_strange
Posts: 17,713
Registered: ‎07-14-2008

Re: How to set minimum date using DateTimePicker in blackberry

I'm obviously missing something here:

 

dateTimePicker.setMinimumDate(Calendar minCalendar)

Please use plain text.