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

Date selected doesn't update on Today button #358

Open
MrJai opened this issue Nov 2, 2017 · 4 comments
Open

Date selected doesn't update on Today button #358

MrJai opened this issue Nov 2, 2017 · 4 comments

Comments

@MrJai
Copy link

MrJai commented Nov 2, 2017

simulator screen shot - iphone 7 - 2017-11-02 at 21 07 41

Hi @jonathantribouharet

I am back with another point that is less of an issue and more of a feature request. In the calendar implementation, and even in the example provided we can select any detail and it call the specific delegate so that we can scroll a list or do anything on that selection.

`
(void)calendar:(JTCalendarManager *)calendar didTouchDayView:(JTCalendarDayView *)dayView
{
_dateSelected = dayView.date;

// Animation for the circleView
dayView.circleView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.1, 0.1);
[UIView transitionWithView:dayView
                  duration:.3
                   options:0
                animations:^{
                    dayView.circleView.transform = CGAffineTransformIdentity;
                    [_calendarManager reload];
                    if ([self.delegate respondsToSelector:@selector(dateTapped:)]) {
                        [self.delegate dateTapped:_dateSelected];
                    }
                } completion:nil];


// Don't change page in week mode because block the selection of days in first and last weeks of the month
if(_calendarManager.settings.weekModeEnabled){
    return;
}
// Load the previous or next page if touch a day from another month
if(![_calendarManager.dateHelper date:_calendarContentView.date isTheSameMonthThan:dayView.date]){
    if([_calendarContentView.date compare:dayView.date] == NSOrderedAscending){
        [_calendarContentView loadNextPageWithAnimation];
    }
    else{
        [_calendarContentView loadPreviousPageWithAnimation];
    }
}

}
`

But when we click on today button, there is no way to clear the other date's selection, so that user may know that only today is selected. And other date is no more a selected date ?

@jvashisht
Copy link

yes i am also stuck here, how to deselect the today's date. @MrJai did you solved the problem ??

@MrJai
Copy link
Author

MrJai commented May 22, 2018

nopes @jvashisht, I didn't have any luck, and wasn't able to spend much time on it, but now you have reminded me again, I will look into it once more. Keep me posted if you find anything.

@jonathantribouharet
Copy link
Owner

Sorry, I don't understand what's the problem.
The example provided is an example of implementation of selection, you have delegate methods to customize this implementation like you want.

@MrJai
Copy link
Author

MrJai commented May 22, 2018

The problem is that if today is 22 and it is highlighted in red, now I click on 25th, and it is highlighted in blue. If I click on Today button (not date in calendar, but button to jump back to today), there is no way to deselect 25th.

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

3 participants