Open Wait1997 opened 3 years ago
同样有遇到,有解决办法吗
Same Here
I solved it to prevent the picker from opening if the min and max dates are the same...it works fine and it does the purpose because there is no need to open the date picker if you can not choose any dates but one
if(minDateTime.compareTo(maxDateTime) < 0){
DatePicker.showDatePicker(
context,
..............
);
}
Change the minDateTime & max DateTime with the variable names you are using in the code.
如果选择当前到未来一个月的时间段,那么当前时间跟minDateTime势必是一样的。这样的话,分钟会显示为0而不会显示当前分钟数,请问该怎么办呢
如果现在的时间是晚上19:18,那么格式化为 yyyy-MM-dd HH:mm 后 19时的minute将只有01到41