Currently, I have the spinner in dialog
mode.
Do not use Spinner, but using TextView, and install a click listener to it.
In order to turn TextView looks like Spinner, here is the technique
<TextView
android:id="@+id/date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.72"
android:text="Aug 20, 2012"
style="@android:style/Widget.Holo.Light.Spinner" />
or
<TextView
android:id="@+id/date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.72"
android:text="Aug 20, 2012"
style="@android:style/Widget.Holo.Spinner" />
I think you are going to have trouble making that work with a Spinner. The concept of a Spinner is such that it is expecting to show a list of items for the user to choose from.
Instead of a Spinner I think you should use a Button that pops up a custom dialog containing a the DatePicker. You could even wire it up correctly to show the selected date as the Text on the Button if you wanted to.