Skip to content

show current date when calendar loads  #21

@hemangshah

Description

@hemangshah

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions