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

How to: Start week from Monday #20

Open
rutmb opened this issue Nov 20, 2016 · 3 comments
Open

How to: Start week from Monday #20

rutmb opened this issue Nov 20, 2016 · 3 comments

Comments

@rutmb
Copy link

rutmb commented Nov 20, 2016

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)?
@BadChoice
Copy link
Owner

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 BadChoice changed the title Start week from Monday How To Start week from Monday Dec 12, 2016
@BadChoice BadChoice changed the title How To Start week from Monday How to: Start week from Monday Dec 12, 2016
@eak65
Copy link

eak65 commented Oct 18, 2017

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?

@mmmcompanies
Copy link

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

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

4 participants