0

Here's the situation, I'm building an app for an university.In the calendar activity, On every other date there is different time tables. So a student can click on a date and gets the time table for that day, and when click on another date gets the time table for that day. The time tables are different on every date. And also when clicking on a date i want the day on that particular date. I'm taking the student data through Strings.

Neck
  • 611
  • 1
  • 7
  • 21

1 Answers1

0

Add listener to datepicker

atePicker.init(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), new DatePicker.OnDateChangedListener() {

                @Override
                public void onDateChanged(DatePicker datePicker, int year, int month, int dayOfMonth) {
                    Log.d("Date", "Year=" + year + " Month=" + (month + 1) + " day=" + dayOfMonth);

                }
            });

you will get changed date in onDateChanged method.

Harshal Shah
  • 427
  • 3
  • 5