Spinner Date model doesn't support Calender interaction directly. However, you can create Date from Calender instance and work with it:
public SpinnerDateModel(Date value, Comparable start, Comparable end, int calendarField)
And then if you need to change the value, you will have to use:
public void setCalendarField(int calendarField)
function, which Changes the size
of the date
value change computed by the nextValue
and previousValue
methods. The calender fields are one of:
Calendar.ERA
Calendar.YEAR
Calendar.MONTH
Calendar.WEEK_OF_YEAR
Calendar.WEEK_OF_MONTH
Calendar.DAY_OF_MONTH
Calendar.DAY_OF_YEAR
Calendar.DAY_OF_WEEK
Calendar.DAY_OF_WEEK_IN_MONTH
Calendar.AM_PM
Calendar.HOUR
Calendar.HOUR_OF_DAY
Calendar.MINUTE
Calendar.SECOND
Calendar.MILLISECOND
Check out the SpinnerDateModel
documentation, for more details.