-
Notifications
You must be signed in to change notification settings - Fork 410
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
Feature/date range without long press #73
base: master
Are you sure you want to change the base?
Feature/date range without long press #73
Conversation
- When this option is enabled the date-range option is also enabled. This allows the user to tap on two dates to select the interval of dates inclusive. - The option is applies using SublimeOptions.setToggleRangeWithoutLongPress(...) - The behaviour of long select of date range remains unaffected when setToggleRangeWithoutLongPress is disabled.
- Update sample app with range select without long press option.
…tic. This was a Codacy identified issue.
…check where required.
… fills in the range between first tap and current tap.
@vikramkakkar Hi Vikram, can I get some help on an issue. I'm trying to implement the following behavior but having trouble. Click on a day to select it, long click on the second date to select the range between the two dates. Can you do it or show me show me in the right direction. Here is what I've tried: I see that on DayPickerViewPager.java class, the place where you set mIsLongPressed = true is where you determine if it's been long pressed, I was able to keep track of the last start date and modify the mTempSelectedDate's start or end date (depending on which date is before or after the other). But there are small bugs here and there, mainly to do with tvHeaderDateStart.setActivated(mCurrentlyActivatedRangeItem == RANGE_ACTIVATED_START); In SublimeDatePicker.java and some other issues. Would you happen to know an easy to way to simply do this:
|
@vikramkakkar @vikram-kakkar Could you check this PR? |
This resolves issue #53 .
SublimeOptions
have been modified to change behaviour between existing long press for date range selection and 2 taps for range selection.Use the option
SublimeOptions.setToggleRangeWithoutLongPress(true)
when initializingSublimePicker
.