Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Date Picker Material Design

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 989
    Comment on it

    I am writing way to add and use date Picker Material design library to our project. First of all we need to add library to our build.gradle file

    dependencies {
    compile 'com.wdullaer:materialdatetimepicker:1.5.4'

    Then we need to implements OnDateSetListener to our Activity or Fragment and after it we need to override its method onDateSet() that will invoke when you choose the date.

    public void onDateSet(DatePickerDialog view, int yr, int mtnYr, int dayMonth) {
    String date = "dayMonth +"/"+( mtnYr +1)+"/"+yr;

    To open date Picker we need to implement this:

    Calendar calendar = Calendar.getInstance();
    DatePickerDialog datePicker = DatePickerDialog.newInstance(
    );, "datepicker");

 1 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: