Hi, I'm trying to create a JSpinner to enable the user to pick a Date. I want there to be a lower date limit and an upper date limit. I also want the initial value to be the lower date limit. Unfortunately, My problem is that it won't let me use the lower limit as the initial value (the JSpinner simply becomes unresponsive). Here is my code:
SpinnerDateModel model = new SpinnerDateModel();
model.setStart(minTime); //lower limit
model.setEnd(maxTime); //upper limit
model.setValue(minTime); //doesn't like this!
model.setCalendarField(Calendar.MINUTE);
JSpinner timePicker = new JSpinner(model);
timePicker.setEditor(new JSpinner.DateEditor(timePicker, "HH:mm dd/MM/yy"));
If I set the initial value to be one minute before or after the lower limit, it works fine. But for my requirements, I do not want that.
Help?