Android: DatePicker shows wrong day order after setting date minus

Basically, we want the user to plan a day in the future from now on. Here is the code:

DatePicker date_picker = (DatePicker) findViewById(R.id.date_picker);
date_picker.setMinDate(System.currentTimeMillis()); 
// other settings

      

First, it shows the current day: 04 / Aug / 2017, but when the month is scrolled, something strange happens:

enter image description here

+3


source to share


1 answer


try it

This user can select the minimum date of the current date



        DatePicker date_picker = (DatePicker) findViewById(R.id.date_picker);
        date_picker.setMinDate(System.currentTimeMillis() - 1000);

      

0


source







All Articles