0

This is the code of my DatePicker

DatePicker datePicker = new DatePicker();
datePicker.setDateFormat(new SimpleDateFormat("dd.MM.yy"));
datePicker.getComponent(0).setFont(font);
int height = datePicker.getComponent(0).getPreferredSize().height;
datePicker.getComponent(1).setPreferredSize(new Dimension(height, height));
inputList.add(datePicker);
Balázs Édes
  • 13,452
  • 6
  • 54
  • 89

2 Answers2

0

Try this:

picker.getMonthView().setUpperBound(new Date().getTime());
Chandu D
  • 505
  • 3
  • 17
0

I think you can use the concept of restricted dates:

boolean com.michaelbaranov.microba.calendar.VetoPolicy.isRestricted (   Object  source, Calendar    date )      

This method is used to check if a date is restricted.

Restricted dates can not be selected by users in a control.

Parameters: source a control calling this method date a date to check. Is never null Returns: true if given date is restricted false otherwise

http://sourcecodebrowser.com/libmicroba-java/0.4.4.3/interfacecom_1_1michaelbaranov_1_1microba_1_1calendar_1_1_veto_policy.html

NilZzz
  • 26
  • 3