Add a styled date picker to an Android app that automatically matches your app accent color with one Gradle dependency.
Let users pick appointment times with a Material Design time picker supporting 12-hour and 24-hour formats.
Block specific unavailable dates in a booking app date picker using a simple exclusion list.
Enable a seconds picker in addition to hours and minutes for a precise time entry in a scheduling app.
Material DateTime Picker is an Android library that gives your app a date picker and a time picker that match Google's Material Design guidelines. Android already provides built-in date and time pickers, but this library builds on that foundation and makes it easier to style them to fit your app's colors and theme. Adding the library to a project is done with a single line in your Gradle build file. Using it requires three steps: set up a listener so your code receives the chosen date or time, create a picker dialog using a factory method, and show that dialog. The library's API closely follows the standard Android pattern, so developers familiar with Android pickers will find it familiar. Theming is flexible. The pickers automatically pick up the accent color from your app's theme. You can also set a specific color in code, or override color resources in your project's XML files. There is a dark mode for both pickers that you can enable either in code or through an XML attribute. Two layout versions are included: one based on older Material Design era guidelines, and a second (the default) that matches the design Google introduced with Android Marshmallow. The library includes a broad set of configuration options: setting a minimum and maximum selectable date, blocking out specific dates or times, enabling a seconds picker in addition to hours and minutes, switching between 12-hour and 24-hour clock formats, and customizing the OK and Cancel button labels and colors. There is also a vibration toggle and a dismiss-on-pause option for handling app lifecycle events cleanly. The library supports Android 4.1 and above. It is published on Maven Central under the Apache 2.0 license and is available as a standard Gradle dependency. The README is detailed and covers each option with code examples.
← wdullaer on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.