Giter Site home page Giter Site logo

Selecting a date should also select its FollowingMonthWithinBoundary or PreviousMonthWithinBoundary counterpart and vice versa about jtapplecalendar HOT 12 CLOSED

patchthecode avatar patchthecode commented on May 2, 2024
Selecting a date should also select its FollowingMonthWithinBoundary or PreviousMonthWithinBoundary counterpart and vice versa

from jtapplecalendar.

Comments (12)

N1c0L4z3R avatar N1c0L4z3R commented on May 2, 2024 1

Thank you very much for updating the library!

For the month displayed on the cell, I did it in the setupCellBeforeDisplay of the CellView.
The xib is the same, only the label is being displayed on 2 lines instead of 1.

        let cal: NSCalendar = NSCalendar.currentCalendar()
        let comp: NSDateComponents = cal.components([.Day], fromDate: cellState.date)

        if comp.day == 1 {
            let monthFormatter = NSDateFormatter()
            monthFormatter.dateFormat = "MMM"

            let attributedString = NSMutableAttributedString()
            attributedString.appendString(monthFormatter.stringFromDate(cellState.date), color: UIColor.darkGrayColor(), font: .buttonTextBoldFont())
            attributedString.appendString("\n\(cellState.text)", color: UIColor.darkGrayColor(), font: .termsOfUseFont())
            dayLabel.attributedText = attributedString
        }

Hope it helps a bit ;)

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024 1

updated to version 3.0.0
Let me know if its still an issue. Or we can close this one.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Looking into this to see if i understand your problem. one sec.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Ok, i get what you're saying.

Selecting a date should also select its FollowingMonthWithinBoundary or PreviousMonthWithinBoundary counterpart?

from jtapplecalendar.

N1c0L4z3R avatar N1c0L4z3R commented on May 2, 2024

Yes that's exactly what I want to do with calendarView.selectDates()
Is it possible please?

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

It will be possible after i put in the next update. Should be in by this Saturday worst case or by end of day today best case.
I had forgot to include that code actually. In making the calendar I cant think of every scenario unless you guys point it out.

One last request: How did you make the other dateCells to have the date only for one date and Month plus date for another cell?
screen shot 2016-05-18 at 8 19 26 am
screen shot 2016-05-18 at 8 19 17 am

Did you have all the configuration for the cell in a single xib file?
The reason I am asking you this is because I am currently working on an upgrade that should allow you to register multiple cells, which would reduce the clutter of a developer cramming trying to cram multiple configurations into an xib. So letting me know how you did it would be very beneficial to this project. Thanks.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Thanks. I'll continue with the fix i mentioned above, and the update coming for this Saturday or end of day today (best case scenario)

from jtapplecalendar.

N1c0L4z3R avatar N1c0L4z3R commented on May 2, 2024

Hello!
Thank you for the update I'm going to check and I'll let you know!

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

updated to version 3.0.1 to fix a small visual bug i missed.
Closing this issue. Reopen it if you are still experiencing problems.

from jtapplecalendar.

N1c0L4z3R avatar N1c0L4z3R commented on May 2, 2024

Hi again.
Thank you so much!! It's working great!

I only have one issue now, you commented "init(frame: CGRect)" and the only initializer left is "init?(coder aDecoder: NSCoder)".
This is good if you are working only with XIB or storyboards, but since in my team we are doing everything in code, this optional initializer is driving me crazy and require me to unwrap the variable everywhere in my code.
Could you add a simple init or uncomment the init(frame: CGRect) line 389 please? :)

Also do you want me to open a new issue for this?
I think it could be a nice improvement to make the lib 100% independent from xib.
Thank you for your time and your great lib!

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Ok. Open a new issue for this. I will look into it in the mean time.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Oh that init! haha. I commented it out to look into something. I forgot to uncomment it.
Uncomment it from your end. I will do a patch release after i work out a visual bug i'm working on.

In the mean time, just open a new issue for this. thanks!

from jtapplecalendar.

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.