I created a datepicker and users are able to pick a date from it, in another textview i want to show the date of one exact month later. (E.g. User chooses 25th of February, the view will show 25th of March)
val simpleDateFormat = SimpleDateFormat("dd/MM/yyyy", Locale.getDefault())
val getDate :Calendar = Calendar.getInstance()
val datepicker = DatePickerDialog(this,android.R.style.Theme_Holo_Light_Dialog_MinWidth,DatePickerDialog.OnDateSetListener
{ datePicker, i, i2, i3 ->
val selectDate :Calendar = Calendar.getInstance()
selectDate.set(Calendar.YEAR,i)
selectDate.set(Calendar.MONTH,i2)
selectDate.set(Calendar.DAY_OF_MONTH,i3)
val date :String = simpleDateFormat.format(selectDate.time)
sulusText.setText(date)
},getDate.get(Calendar.YEAR),getDate.get(Calendar.MONTH),getDate.get(Calendar.DAY_OF_MONTH))
datepicker.show()
}
}
So here user can choose the date with sulustext and in another view i'd like show the date of one month later.