public void setSelectionType ( MaterialDatePickerType selectionType ) { this . selectionType = selectionType ; switch ( selectionType ) { case MONTH_DAY : options . selectMonths = true ; break ; case YEAR_MONTH_DAY : options . selectYears = yearsToDisplay ; options . selectMonths = true ; break ; case YEAR : options . selectYears = yearsToDisplay ; options . selectMonths = false ; break ; } }
Set the pickers selection type .