We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能否加个年月的type
The text was updated successfully, but these errors were encountered:
可以自己加, "yyyy-MM"
Sorry, something went wrong.
目前想到的办法,首先枚举增加一个类型 public enum DateType {
TYPE_ALL("yyyy-MM-dd E hh:mm"),//年、月、日、星期、时、分 TYPE_YMDHM("yyyy-MM-dd hh:mm"),//年、月、日、时、分 TYPE_YMDH("yyyy-MM-dd hh"),//年、月、日、时 TYPE_YMD("yyyy-MM-dd"),//年、月、日 TYPE_YM("yyyy-MM"),//年月 TYPE_HM("hh:mm");//时、分 private String format;
DateType(String format) { this.format = format; }
public String getFormat() { return format; } }
然后DatePicker.java中也要适用这个类型 case TYPE_YM: this.minuteView.setVisibility(GONE); this.hourView.setVisibility(GONE); this.weekView.setVisibility(GONE); this.dayView.setVisibility(GONE); this.monthView.setVisibility(VISIBLE); this.yearView.setVisibility(VISIBLE); break;
然后就有了年月的选项了
No branches or pull requests
能否加个年月的type
The text was updated successfully, but these errors were encountered: