Skip to content

Commit

Permalink
Merge pull request #6 from granoeste/master
Browse files Browse the repository at this point in the history
Immediately set text when set date.
Jonatan E. Salas authored May 11, 2017
2 parents 1babf96 + 2885737 commit f78d609
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -143,8 +143,13 @@ public Calendar getDate() {
return date;
}

public DatePickerEditText setDate(@NonNull Calendar date) {
this.date = date;
public DatePickerEditText setDate(@NonNull Calendar calendar) {
if (textDateFormat != null) {
setText(textDateFormat.format(calendar.getTime()));
} else {
setText(DateUtils.toDate(calendar.getTime(), dateFormat));
}
date = calendar;
return this;
}

0 comments on commit f78d609

Please sign in to comment.