tjeerdintveen/Vurig-Calendar

How to start from sunday?

Opened this issue · 4 comments

I commented this line [weekdays moveObjectFromIndex:0 toIndex:6]; so it shows correct weekdays -from sunday to monday but it shows not correct days right now. Please advise

I can't fully support this code right now. But you can use the NSDate categories to adjust the calendar types and therefor the dates. You may also want to look into the drawrect method of the calendar to adjust the names of the week.

but i need to show correct dates with correct weekdays. I commented [weekdays moveObjectFromIndex:0 toIndex:6]; but it is not enough. Hope for your help in drawRect method

OK. I found how to start from SUNDAY.
need to change two rows :

  1. comment [weekdays moveObjectFromIndex:0 toIndex:6]; in drawRect method. Now it will start from sunday
  2. change firstWeekInMonth method in NSDate+convenience. Change [gregorian setFirstWeekday:2]; to [gregorian setFirstWeekday:1];

That's it

Thanks, DKalachniuk. You saved my day!!! :)