I want to get the selected date of a DatePicker via two-way data binding.
Following this guide from Google, there should be three attributes for my DatePicker,
android:year
android:month
android:day
which are intended for the two-way data binding.
However, those attributes do not appear for my DatePicker.
Am I missing out on some dependency, maybe? How can I get the selected date, using two-way data binding?
This is the DatePickers XML:
<DatePicker
android:id="@+id/date_picker"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:calendarViewShown="false"
android:datePickerMode="spinner"
app:layout_constraintEnd_toEndOf="@id/guideline_end"
app:layout_constraintStart_toStartOf="@id/guideline_start"
app:layout_constraintTop_toTopOf="@id/guideline_top"
/>