Disabling Past And Future Dates in Date Picker ADF

Hi All, In this post I am going to show you how you can disable the past dates and future dates in date picker in ADF. To disable the past date for af:inputDate component we have one property "minValue". If you want to disable all the dates before current date then you can do the following. First of all write a method in your bean which will return you the current date in the format "yyyy-MM-dd" as shown below. public Date getCurrentSystemDate() { try { Calendar now = Calendar.getInstance(); java.util.Date date = now.getTime(); DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String currentDate = formatter.format(date); return formatter.parse(currentDate); } catch (Exception e) { return null; } } Now bind this method to minValue property of af:inputDate component. ...