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

Work for only 1 year #27

Open
ShaikBaji1506 opened this issue Dec 17, 2018 · 5 comments
Open

Work for only 1 year #27

ShaikBaji1506 opened this issue Dec 17, 2018 · 5 comments
Labels
invalid This doesn't seem right

Comments

@ShaikBaji1506
Copy link

Hi, I have installed pod in my project I have noticed that it work's for only one year which mean 12 month's for example: it present month is Dec ,2018. it is moving forward scroll for Nov 2019 only only a 12 months working. please resolve this issue asap

@Vodolazkyi
Copy link
Owner

@ShaikBaji1911 Hi, you can init VACalendar view with any dates http://prntscr.com/lw0hlt

@Vodolazkyi Vodolazkyi added the invalid This doesn't seem right label Dec 17, 2018
@ShaikBaji1506
Copy link
Author

Hello, Can you please update the pod with this piece of code so that there would be no problem we can use for any month any year without no restriction to one year please. that's it everything wok's fine

@ShaikBaji1506
Copy link
Author

@Vodolazkyi Hi, Can you please update the pod with this piece of code so that there would be no problem we can use for any month any year without no restriction to one year please. that's it everything wok's fine please make the change it is very useful Thank's in Advance please reply asap @Vodolazkyi

@meetiosdev
Copy link

meetiosdev commented Mar 5, 2019

@ShaikBaji1911 Just when you are doing let calendar = VACalendar(calendar: defaultCalendar) in your view controller
replace this line with let calendar = VACalendar(startDate: startDate, endDate: endDate, selectedDate: endDate, calendar: defaultCalendar)

full code below

    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = "dd-mm-yyyy"
  
    guard let startDate = dateFormatter.date(from: "01-01-2000") else {
        fatalError()
    }
    guard let endDate = dateFormatter.date(from: "01-01-2050") else {
        fatalError()
    }
    
    
    // let calendar = VACalendar(calendar: defaultCalendar)
    
    let calendar = VACalendar(startDate: startDate, endDate: endDate, selectedDate: Date(), calendar: defaultCalendar)
    calendarView = VACalendarView(frame: .zero, calendar: calendar)
    calendarView.showDaysOut = true
    calendarView.selectionStyle = .single
    calendarView.monthDelegate = monthHeaderView
    calendarView.dayViewAppearanceDelegate = self
    calendarView.monthViewAppearanceDelegate = self
    calendarView.calendarDelegate = self
    calendarView.scrollDirection = .horizontal

@ShaikBaji1506
Copy link
Author

ShaikBaji1506 commented Nov 13, 2019

great thank's @SwarajMeetIOSDeveloper I have fixed this issue at that same time.cheers !! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants