Skip to content

harunbekcan/EasyDatePicker

Repository files navigation

EasyDatePicker

datepicker

Installation

Add this to project level build.gradle

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Add the dependency into you app level build.gradle

dependencies {
    implementation 'com.github.harunbekcan:EasyDatePicker:VersionName'
}

Usage

private var startDate = Calendar.getInstance()
private val startDateListener = MutableLiveData<String>()
EasyDatePicker(this)
            .setDate(startDate)
            .setDatePickerStyle(R.style.StyleExample)
            .setFormatType(DATE_FORMAT)
            .setListener(startDateListener)
            .setEditText(findViewById(R.id.startDateEditText))
            .show()