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

show current date when calendar loads #21

Closed
hemangshah opened this issue Jan 11, 2014 · 4 comments
Closed

show current date when calendar loads #21

hemangshah opened this issue Jan 11, 2014 · 4 comments

Comments

@hemangshah
Copy link

I want to show current date selected when calendar loads.

I've tried using,

NSDate *today = [NSDate date];
NSCalendar *gregorian = [[NSCalendar alloc]
                         initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *component = [gregorian components:(NSCalendarUnitDay|NSCalendarUnitMonth|NSCalendarUnitYear) fromDate:today];

[_calendarView setSelectedRange:[[DSLCalendarRange alloc] initWithStartDay:component endDay:component]];

But its selecting each and every day into the calendar.

Any solution?

@EvgenyKarkan
Copy link

Hi !
You may check out my pull request #19.
I provide simple solution for set current day marked with another color.

@hemangshah
Copy link
Author

@EvgenyKarkan, thanks man! It's helped me!

@EvgenyKarkan
Copy link

Glad to hear it. Cool :)

@rafaelalmoraes
Copy link

Hi, I need uncheck current day when touch in another day.

Thanks.

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