mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-18 06:45:03 -05:00
Adding a min date not to go below creation date
This commit is contained in:
parent
a1230bbe53
commit
7a95784074
@ -106,7 +106,8 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
|||||||
mDeleteButton.setOnClickListener(this);
|
mDeleteButton.setOnClickListener(this);
|
||||||
|
|
||||||
setExpiryDate(null);
|
setExpiryDate(null);
|
||||||
|
String creationDate = mCreationDate.getText().toString();
|
||||||
|
Date date = DateFormat.getDateInstance().parse(creationDate);
|
||||||
mExpiryDateButton.setOnClickListener(new OnClickListener() {
|
mExpiryDateButton.setOnClickListener(new OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
GregorianCalendar date = mExpiryDate;
|
GregorianCalendar date = mExpiryDate;
|
||||||
@ -129,6 +130,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
dialog.getDatePicker().setMinDate(date.getTime());
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user