GithubHelp home page GithubHelp logo

daij-djan / ddcalendarview Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 11.0 65 KB

a calendar view that looks like the ical view while supporting Drag & Drop (can show 1 day or a week - lots of IBDesignables)

License: BSD 2-Clause "Simplified" License

Objective-C 89.68% Swift 9.68% Ruby 0.64%

ddcalendarview's People

Contributors

daij-djan avatar miquelbotanch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ddcalendarview's Issues

xcode live rendering issue

@Daij-Djan
file:///DDCalendarView-master/Demos/CalendarDemo_objc/Base.lproj/Main.storyboard: error: IB Designables: Failed to update auto layout status: The agent crashed

file:///DDCalendarView-master/Demos/CalendarDemo_objc/Base.lproj/Main.storyboard: error: IB Designables: Failed to render instance of DDCalendarView: The agent crashed

recently facing these two errors in storyboard live rendering
xcode version 7.3
iOS 9.2

Issue when change constraints

Hi,

I've tried to change the timeline constrain:
#define HEIGHT_CELL_HOUR 100.
in:
#define HEIGHT_CELL_HOUR 50.

But after this change, the Event Views aren't entered in the right time slot.
Example: if I've an event from 16pm to 18pm in the timeline result as like 16.15pm to 18.15pm.

As consequence the method
- (void)scrollDateToVisible:(NSDate* _Nonnull)date animated:(BOOL)animated;
doesn't scroll properly to the correct date.

Any way to fix it?

Can we disable horizontal scroll.

I want to use Calendar for a single day is there any possibility that we can disable horizontal scroll and use it for a single day.

Does DDCalendarView support different timezones

I was implementing it in a manner that calendar shows 12am to 12am and came to an issue when I change device's timezone the calendar then changes its display eg. for GMT it shows 12am to 12am and when I change it to IST is shows 5:30am to 5:30am
Please help!
Thanks in advance

This is hidden jewel for SWIFT

Hi.... I love your library! But I have a problem with your swift example. Too complicate and does not work or show real word ussage on simulator in 3 minutes....
I think here is better DEMO for all swift players. Cheers.


import UIKit
import EventKit
import EventKitUI

class ViewController: UIViewController, DDCalendarViewDelegate, DDCalendarViewDataSource, EKEventViewDelegate {
    
    @IBOutlet var calendarView: DDCalendarView!;
    
    override func viewDidLoad() {
        self.calendarView.scrollDateToVisible(Date(), animated: false)
    }
    
    /*
    *   Add your events and display them on screen
    */
    func events(forDay dayMod: Int) -> [Any] {
        let event2 = DDCalendarEvent()
        event2.title = "Demo Event 2"
        event2.dateBegin = NSDate(hour: 17, min: 0, inDays: dayMod) as Date!
        event2.dateEnd = NSDate(hour: 19, min: 0, inDays: dayMod) as Date!
        
        let event3 = DDCalendarEvent()
        event3.title = "Demo Event 3"
        event3.dateBegin = NSDate(hour: 15, min: 50, inDays: dayMod) as Date!
        event3.dateEnd = NSDate(hour: 16, min: 0, inDays: dayMod) as Date!

        return [event2, event3]
    }

    //display events for today
    func calendarView(_ view: DDCalendarView, eventsForDay date: Date) -> [Any]? {
        let newDate = date as NSDate
        let daysMod: Int = newDate.days(from: Date())
        let newE: [DDCalendarEvent] = self.events(forDay: daysMod) as! [DDCalendarEvent]
        var dates = [Any]()
        for e: DDCalendarEvent in newE {
           // if e.dateBegin == date || e.dateEnd == date {
            dates.append(e)
           // }
        }
        return dates
    }
    
    public func calendarView(_ view: DDCalendarView, viewFor event: DDCalendarEvent) -> DDCalendarEventView? {
        let view = DDCalendarEventView(event: event)
        view?.backgroundColor = UIColor.red.withAlphaComponent(0.5)
        view?.layer.borderColor = nil
        view?.layer.borderWidth = 0
        return view
    }
        
    func eventViewController(_ controller: EKEventViewController, didCompleteWith action: EKEventViewAction) {
        self.dismiss(animated: true, completion: nil)
    }
}

DDCalendarEvent change the time zone

Hi,

I am setting the time zone as UTC for dateBegin and dateEnd. But while displaying events on calendar, it is taking the time zone as +530 and showing events on the wrong time.

Please help.

Unable to reload the ddCalendarView.

Hi @Daij-Djan
I am facing a issue where I am unable to reload the DDCalendarView.

Issue Description:
I am using the RESTFUL API in my app. Once I got the data response, filled the ddcalendarEvent dictionary & reload the DDCalendarView, but the data are not shown in UI even though there is data available in the DDCalendarEvent Variables. Sorry for bothering you. If I am wrong some where please correct me.

Note : the date is in UTC format.

Is it possible to show vertical border lines between days columns?

Hi,

When I first fired the demo app I put it in portrait (constraint in my app) and didn't even notice it was showing 7 days because I expected at least some border between days. I think it would be nice to be able to draw a vertical line between each day. Is this possible? If yes, how can we customise that? If no, can this be added with color customisation?

Thank you

Sébastien

Event color not changing in SWIFT

I am trying to change event color in the swift code but it's not taking. i am giving like this
event.userInfo = ["color":UIColor.yellow]

Project in Swift shows no event list

I've managed to show DDCalendarView in my project in Swift, but no event list is showing. I just want to know how to add some dummy data to this view to test it out. I'm new to iOS development so please bear with me 😄

screen shot 2016-01-10 at 21 05 45

How to increase timeline view width with scrolling

Hi... i like your library but i have one problem i want to display 20 event in same day and same time.when i display 20 event in same time than all the event is display in same place so how can i increase width.also i add screenshot pls check
pls help me....
screen shot 2017-09-07 at 5 18 08 pm

Crashing on event title length

Here is problem method. The comended piece is the problem one.

  • (void)setEvent:(DDCalendarEvent )event {
    _event = event;
    /

    assert(event.title.length);
    assert(event.dateBegin);
    assert(event.dateEnd);*/

    self.label.text = [NSString stringWithFormat:@"%@\n\n%@\n%@", event.title, event.dateBegin.stringWithTimeOnly, event.dateEnd.stringWithTimeOnly];
    [self.label sizeToFit];
    }

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.