Skip to content

Commit

Permalink
fix: Ok/Cancel buttons visible in DatePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
nb2998 authored and therajanmaurya committed Jan 17, 2018
1 parent ddafef4 commit c2a3743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ public void showPreviousCustomerDetails() {

@OnClick(R.id.et_date_of_birth)
void onClickDateOfBirth() {
DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), date, calendar
DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(),
R.style.MaterialDatePickerTheme, date, calendar
.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
calendar.get(Calendar.DAY_OF_MONTH));
datePickerDialog.getDatePicker().setMaxDate(System.currentTimeMillis());
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@
<item name="android:background">@color/white</item>
</style>

<style name="MaterialDatePickerTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>

0 comments on commit c2a3743

Please sign in to comment.