Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.59 KB

DATETIME.md

File metadata and controls

67 lines (49 loc) · 1.59 KB

DateTime

Table of Contents

  1. Gradle Dependency
  2. Date
  3. Time
  4. DateTime

Gradle Dependency

DateTime

The datetime module contains extensions to make date, time, and date-time picker dialogs.

dependencies {
  ...
  implementation 'com.afollestad.material-dialogs:datetime:3.2.1'
}

Date

MaterialDialog(this).show {
  ...
  datePicker { dialog, date ->
    // Use date (Calendar)
  }
}

You can optionally provide minDate, maxDate and currentDate parameters as well.

Time

MaterialDialog(this).show {
  ...
  timePicker { dialog, time ->
    // Use time (Calendar)
  }
}

You can optionally provide currentTime and show24HoursView parameters as well.

DateTime

MaterialDialog(this).show {
  ...
  dateTimePicker(requireFutureDateTime = true) { _, dateTime ->
    // Use dateTime (Calendar)
  }
}

You can optionally provide minDateTime, maxDate, currentDateTime, show24HoursView, and requireFutureDateTime parameters as well.