I am building an application in that I want to disable past dates in the calender. How to do that

What should I do more to disable past dates in this piece of code? @Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { Calendar calendar = new GregorianCalendar(year, month, dayOfMonth); Log.d("Month", String.valueOf(month)); mStartdate = Long.toString(calendar.getTimeInMillis() / 1000); tripStartDate.setText(dayOfMonth + "/" + (month + 1) + "/" + year); } }