Skip to content
New issue

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

wrong end range in RANGE selection type #27

Closed
yasfdany opened this issue Nov 30, 2017 · 0 comments
Closed

wrong end range in RANGE selection type #27

yasfdany opened this issue Nov 30, 2017 · 0 comments

Comments

@yasfdany
Copy link

yasfdany commented Nov 30, 2017

When I choose range day, end range always return one day after start range

this is my code :

CalendarDialog cal = new CalendarDialog(getActivity());
cal.setOnDaysSelectionListener(new OnDaysSelectionListener() {
@OverRide
public void onDaysSelected(List selectedDays) {
if (selectedDays.size()>0) {
checkin_date = selectedDays.get(0).getCalendar().getTime();
checkin_string_date = formatMonth.format(checkin_date)+"/"+formatDay.format(checkin_date)+"/"+formatYear.format(checkin_date);
tanggalin.setText(ExtradateFormatForMonth.format(checkin_date));

                if (selectedDays.size()>1)
                {
                    checkout_date = selectedDays.get(1).getCalendar().getTime();
                    checkout_string_date = formatMonth.format(checkout_date)+"/"+formatDay.format(checkout_date)+"/"+formatYear.format(checkout_date);
                    tanggalout.setText(ExtradateFormatForMonth.format(checkout_date));
                }

            }
        }
    });

cal.show();
cal.setSelectionType(SelectionType.RANGE);

@yasfdany yasfdany changed the title wrong end wrong end range Nov 30, 2017
@yasfdany yasfdany changed the title wrong end range wrong end range in RANGE selection type Nov 30, 2017
@yasfdany yasfdany reopened this Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant