I want to have in my activity a button that shows default the current date as a button title and when i click the button to show a date picker dialog and shown the new pick as button title.
How can i achieve that?Any better idea?Is better to do this with EditText for being easier fro the user that he can change the date?
i have attached code here for both time and date, use this as per your requirements.
here intend of txtdate and txtTime youcan set it on button text.
Call This method on button click event.
Visit For More Ref: http://hasmukhbhadani.blogspot.in/search/label/Date%20and%20time%20Dialog.
http://hasmukhbhadani.blogspot.in/search/label/DatePickerSlider%20in%20android.