RVCalendarWeekView icon indicating copy to clipboard operation
RVCalendarWeekView copied to clipboard

How to: Start week from Monday

Open rutmb opened this issue 9 years ago • 3 comments

Hello, dear friend! Big thanks you for your pod file and for your work. It's very helpful!

It will be great if you help me with few questions:

  1. Is is possible to start the week from Monday?
  2. Is it possible to view the past weeks?
  3. How can I add no scrollable view to the top left corner (upper than TimeRowHeader)?

rutmb avatar Nov 20 '16 08:11 rutmb

Hi,

  1. For the week to start on monday, it is really easy but you need to modify the CalendarLayout file, there is a 0 and 6 to know for saturday/sunday, you can easily swap it, In fact, I believe there is a function that tells you wich is the starting day of the locale that would be perfecte, feel free to PR it if you can fix it

  2. Yeah, it should be pretty easy, in weekview there is a function GroupEventsByDay that adds all the days to show, you can just extend it in your own weekview calling super and then just adding the dates before.

  3. If you want something that wont ever move, just add a subvier on top of the weekview

BadChoice avatar Nov 21 '16 09:11 BadChoice

Can you please supply more detail here. I followed the steps and I am still having issues with step 1. Where is the function that returns starting day?

eak65 avatar Oct 18 '17 18:10 eak65

Hi

  1. Is is possible to start the week from Monday?

yes Just change in @implementation MSWeekView Method -(void)groupEventsBySection{

NSDate* date = [NSDate parse:NSDate.today.toDateTimeString timezone:@"device"]; to replace with NSDate* date = [NSDate parse:NSDate.weekStart.toDateTimeString timezone:@"device"];

simulator screen shot - iphone 6s - 2018-03-06 at 16 04 50

mmmcompanies avatar Mar 06 '18 10:03 mmmcompanies