Calender component
How can i disable the Day,Month and Year before the current date from the calendar picker window.
How can i disable the Day,Month and Year before the current date from the calendar picker window.
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());
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