Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-sardari authored Aug 28, 2018
1 parent 7cfbf55 commit f6a4664
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@ dependencies {
Then in your Java Code, you use it like below.

```java
{
DatePickerDialog datePickerDialog = new DatePickerDialog(MainActivity.this);
datePickerDialog.setCalendarType(DateRangeCalendarView.CalendarType.Persian);
datePickerDialog.setSelectionMode(DateRangeCalendarView.SelectionMode.Range);
datePickerDialog.setSelectableDaysCount(5);
datePickerDialog.setCanceledOnTouchOutside(true);
datePickerDialog.setOnRangeDateSelectedListener(new DatePickerDialog.OnRangeDateSelectedListener() {
DatePickerDialog datePickerDialog = new DatePickerDialog(MainActivity.this);
datePickerDialog.setCalendarType(DateRangeCalendarView.CalendarType.Persian);
datePickerDialog.setSelectionMode(DateRangeCalendarView.SelectionMode.Range);
datePickerDialog.setSelectableDaysCount(5);
datePickerDialog.setCanceledOnTouchOutside(true);
datePickerDialog.setOnRangeDateSelectedListener(new DatePickerDialog.OnRangeDateSelectedListener() {
@Override
public void onRangeDateSelected(PersianCalendar startDate, PersianCalendar endDate) {
txtStartDate.setText(startDate.getPersianShortDate());
txtEndDate.setText(endDate.getPersianShortDate());
}
});
}
});

datePickerDialog.showDialog();
```

0 comments on commit f6a4664

Please sign in to comment.