Problems with DatePicker in android

Abdulkadir Dalal

deadline1 = (DatePicker)findViewById(R.id.deadline); int day = deadline1.getDayOfMonth(); int month = deadline1.getMonth(); int year = deadline1.getYear(); final String date = String.valueOf(day)+"-"+String.valueOf(month+1)+"-"+String.valueOf(year);

I used the above code for Datepicker but it shows current date not the one I picked using Datepicker

ARGHA

You have to implement the on date set listener for datepicker See this tutorial to get an idea - http://www.mkyong.com/android/android-date-picker-example/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related