Calender component

How can i disable the Day,Month and Year before the current date from the calendar picker window.

[104 byte] By [JohnnyFlipa] at [2007-11-27 10:54:41]
# 1

I'm not sure what you are asking, but it sounds as if you want to set the minumum date to the current date.

Use the setMinDate method to set the minumum date that the calendar component will accept. The call would look like this<calendarComponentName>.setMinDate(new Date());

Futeleufu_Johna at 2007-7-29 11:51:43 > top of Java-index,Development Tools,Java Tools...
# 2

Try this:

private long MILLISECONDS_PER_DAY = 86400000;

public Date getMinCalDate() {

Date today = new Date();

// minimum date is set to 1 day back to allow for entry from today

Date minCalDate = new Date(today.getTime()- MILLISECONDS_PER_DAY * 2);

return minCalDate;

}

Then bind the min calendar date of ur calendar component to the minCalDate

skipper_a at 2007-7-29 11:51:43 > top of Java-index,Development Tools,Java Tools...