Coder Social home page Coder Social logo

Comments (11)

devinross avatar devinross commented on June 8, 2024

I just haven't had time to implement this. Maybe you could help contribute? I kinda left a trail so it could be added in later.

from tapkulibrary.

nihilenz avatar nihilenz commented on June 8, 2024

I tried to change this way. It seems to work, but I advise you to check.

File: TKCalendarMonthView.m
There are two invocations of initWithMonth in which startDayOnSunday must be changed from YES to sunday (and then you can dinamically get the firstWeekday from current calendar and call initWithSundayAsFirst in init)

File: TKCalendarMonthTiles.m
I changed initWithMonth and rangeOfDatesInMonthGrid as http://gist.github.com/537603

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

@nihilenz: Thanks! I tested the change and I didn't find problems.

I made one further change. To make sure the calendar view is initialized by the current calendar format, change the init method of TKCalendarMonthView.m: http://gist.github.com/543456

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

All changes in one patch: http://gist.github.com/543469

Please review.

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

Sorry, more testing revealed the patch actually doesn't work. When touching a day, the month grid doesn't correctly calculate the day, which was selected. But let's see if I can fix it.

from tapkulibrary.

nihilenz avatar nihilenz commented on June 8, 2024

D'ho! I had not noticed at all...
I edited http://gist.github.com/537603 to add a modification to replace the lines [5-15] of reactToTouch

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

@nihilenz: Haha, I was about to submit a pretty similar fix ;-) Anyways, I'll make a new patch with your version...

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

@nihilenz: the following if

if(row==0 && column < firstWeekday-2){

doesn't change the previous month correctly if the first weekday of a month is Sunday (like now in August 2010).

I decided to use my own version, which looks a bit different, but feel free to make your own patch...

Anyways, the version which works for me is here: http://gist.github.com/543607

Please review again.

from tapkulibrary.

nihilenz avatar nihilenz commented on June 8, 2024

Right!
Your version works fine ;)

from tapkulibrary.

devinross avatar devinross commented on June 8, 2024

Good work! Do you know a way to easily merge these changes back into the framework?

from tapkulibrary.

muhku avatar muhku commented on June 8, 2024

@devinross: Just copy the patch to the root directory of the library and merge it:

patch -p1 < foo.diff

-p1 tells patch to ignore the first path element so it works in the root dir.

from tapkulibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.