Android DatePicker with current date

后端 未结 2 1201
既然无缘
既然无缘 2021-01-16 03:06

I am not getting current date in my datePickerDialog. Always x.xx.1900 :/

Here is my code:

    Calendar c = Calendar.getInstance();         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-16 03:53

    Use This to get the The Latest Date

    public String getDisplayDate(){
        return (dt.getDate()+"/"+(dt.getMonth()+1)+"/"+(dt.getYear()+1900));
    }
    

提交回复
热议问题