Date Picker is used to select date in various apps, generally apps where we need the requirement of placing orders, ore providing details regarding our transactions we require to give date. So, in general there is a Date Picker in android we are using it to fetch the date and store it In my previous tutorial i have shown fetching individual values without any dialog-box you can have a look here –> Getting Time and Date   Date Picker which i am going to show will be like this.








Getting date as in terms of DD/MM/YYYY   fetching individual values

Showing time picker dialog


Creating activity_main.xml

Adding a button to open date picker and also  another textview to set date generally when you need in you app you can extract the date from this textview.


Output :

datepicker1 datepicker

Show Buttons
Hide Buttons
Read previous post:
Android Tutorial On Custom Toast, Dynamic Toast