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

Posts: 48
Registered: ‎07-10-2010
My Device: 8300

how to Disable the past dates in Date Picker

I have a datenpicker in my application, now my requirement is when the user selects a particular date, he sholud not be able to select the past date  . Only the date from today onwards must be made available for him to select.


Or is there something like setting the min and max date limit to the DateTime Picker

Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: how to Disable the past dates in Date Picker



After selection of date check with the current date..if its less than the current..you can sk the user select the date again. or Alert "Invalid Selection"





feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.
Regular Contributor
Posts: 68
Registered: ‎03-17-2010
My Device: 9000,9500,8900
My Carrier: Airtel,Vodafone

Re: how to Disable the past dates in Date Picker

You can follow this steps to achieve the task


1. Set fieldchange listener for your date field.In field change listener's fieldChanged()

2. get the value of date and compare it with your desired date(in this case today's date)

3. If you found any previous date you can either show a pop up or disable the control