Skip to content

Date picker made in material design style with some additional spinners

Notifications You must be signed in to change notification settings

shagiz/AlmostMaterialDatepicker

Repository files navigation

AlmostMaterialDatepicker

Date picker made in material design style with some additional spinner for more convenient use.

screenshot screenshot screenshot

Install

To add this library to your project, you must add the JitPack repo to your root build.gradle file...

allprojects {
 repositories {
    ...
    jcenter()
 }
}

Then include this in your dependencies block

implementation('com.shagi:material-datepicker:1.3') {
        exclude group: 'com.android.support'
    }

Usage

   val dialog = DatePickerFragmentDialog.newInstance({ view, year, monthOfYear, dayOfMonth ->
                Toast.makeText(applicationContext,
                        "year $year month $monthOfYear day $dayOfMonth",
                        Toast.LENGTH_SHORT).show()
            }, 2017, 11, 4)

            dialog.show(supportFragmentManager, "tag")

            /* Possible params
                dialog.setMaxDate(System.currentTimeMillis())
                dialog.setMinDate(System.currentTimeMillis())
                dialog.setYearRange(2000, 2010)
                dialog.setCancelColor(Color.MAGENTA)
                dialog.setOkColor(Color.MAGENTA)
                dialog.setAccentColor(Color.MAGENTA)
                dialog.setCancelText("Out")
                dialog.setOkText("Fine")
            */

About

Date picker made in material design style with some additional spinners

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published