How to Store an YEAR from DatePickerDialog in Kotlin?
So basically i want to get the year from the user using the datePickerDialog and then substract that year to the current year. Till this i have no issues.
The problem is i have button created and want users to get a Toast message if they haven't chosen the date. I am using if else and validating the Year when the datePicker is not selected.
Also the year i am getting after the datePickerDialog is the current year.
Here is the Code -
fun birthdayPicker() {
val cal =...