Giter Club home page Giter Club logo

vurig-calendar's Introduction

VURIG Calendar

A calendar view for iOS.

Easy to use, simple, clean.

Also animated :-)

Installation

Copy the files from the calendar group to your own project.

Usage

VRGCalendarView *calendar = [[VRGCalendarView alloc] init];
calendar.delegate=self;
[self.view addSubview:calendar];

##Delegate methods ####Selecting days Whenever a user selects a date, the following method will be called:

-(void)calendarView:(VRGCalendarView *)calendarView dateSelected:(NSDate *)date;

####Switching months This delegate method will be called whenever a user switches to the next or previous month.

-(void)calendarView:(VRGCalendarView *)calendarView switchedToMonth:(int)month targetHeight:(float)targetHeight animated:(BOOL)animated;

With the way the calendar layouts work, the number of rows (and thus the height) can vary. You can react to this change by using the targetHeight parameter.

Mark the dates of that month by sending an array with NSDate or NSNumber objects. Like so:

NSArray *dates = [NSArray arrayWithObjects:[NSNumber numberWithInt:1],[NSNumber numberWithInt:5], nil];
[calendarView markDates:dates];

Or

NSArray *date = [NSArray arrayWithObjects:[NSDate date], nil];
NSArray *color = [NSArray arrayWithObjects:[UIColor redColor],nil];
[calendarView markDates:date withColors:color];

##License Vurig Calendar is released under the MIT License
http://opensource.org/licenses/MIT

vurig-calendar's People

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vurig-calendar's Issues

how to change height in tableviewCell

I put a calendarView in a first cell of UITableView, There are others in the second cell.
I don't know how to change the height of first cell .What can I code At the method of " ...heightForRowAtIndexPath " ?

Show only weekdays

Hi!
I wonder if it is possible to show only weekdays from monday to friday in the calendar.

with table view like iPhone cal

Is there ways to put this cal with a tableview like the iPhone's cal? You're example is nice but don't see how to make with tableview

thanks

Events

Is it possible to populate and list events?

Its possible to mark only future dates?

hii i have integrated this calender in my project can any one tell me its posible to mark only future dates?

  • (void)calendarView:(VRGCalendarView *)calendarView switchedToMonth:(int)month targetHeight:(float)targetHeight animated:(BOOL)animated;

This method only gives calender month how can i get calender year and day? how to do that? plz tell me..

Date Issue

Hi,

This is a great project, but when I select specific date, the console show the previous day.

I saw the previous threat talked about this issue as well, but there is no solution and the treat is closed. So, please giving a fix to this point.

Thanks,

Disable dates to be choosen

If let say, I develop an app for booking using the calendar, and the app only allow booking from today until next 2 months. Is it possible to disable dates smaller than today and dates greater than 2 months later? Any helps would be really appreciate!

Background Color

How do you change the background color of the view? I'm trying to replace the white color under the calendar with a clear color so that the months that have six rows can still be seen when selected, but without having a white space under the months that have five rows. The background color I have is different from what the calendar is.

Readme on Modifying View/Style

Great project! Would be good to have some additions to the Readme with a quick rundown on modifying the look/style of the calendar. Great work so far!

How to start from sunday?

I commented this line [weekdays moveObjectFromIndex:0 toIndex:6]; so it shows correct weekdays -from sunday to monday but it shows not correct days right now. Please advise

Is possible to insert an image?

Hi, first of all, thanks for this amazing calendar. I would like to ask you, if is possible to insert an image inside of a day cell?

Thanks in advance!

Other languages

Hello! Nice calendar!

How can I change the calendar's language.
I'm modifying the NSDate+convenience.m but without success.

I added this line in the methods:
[gregorian setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"pt_BR"]];

Thanks!

Localization

Hi, I'm using your calendar in my project, great job!

I'd like to ask you for a suggestion in order to localize it (to get the month and the week days localized in the current locale).

Many thanks,

Salva

Architect error

Hi TJ,

Great calendar! it works so cleanly, love it,

Hey Im just having a small error when trying to place it in a project (target 5.0),

Getting this error,
ld: symbol(s) not found for architecture i386

Is there any framework or dependencies I should be linking to the project to make it work?

Kind regards
Taulal

I want to mark several dates in a month with an Array

If i have several dates to mark in a month, it marks only the last date!!?? Please Help

here is the code:

-(void)calendarView:(VRGCalendarView *)calendarView switchedToMonth:(int)month targetHeight:(float)targetHeight animated:(BOOL)animated {
NSArray *test = [NSArray arrayWithObjects:@"2013-07-22",@"2013-07-23",@"2013-08-09",nil];

NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"yyyy-MM-dd"];


NSCalendar *gregorian = [[NSCalendar alloc]
                         initWithCalendarIdentifier:NSGregorianCalendar];

for (int i=0; i<test.count;i++){
     NSDate *mydate = [dateFormat dateFromString:[test objectAtIndex:i]];
     NSDateComponents *components = [gregorian components:NSMonthCalendarUnit fromDate:mydate];

if (month == components.month) {
    NSArray *date = [NSArray arrayWithObjects:mydate, nil];
    NSArray *color = [NSArray arrayWithObjects:[UIColor redColor],nil];
    [calendarView markDates:date withColors:color];
    }
}

}

showNextMonth not respond to delegate method

Edit :
I'm confused, I use a fork of your project on cocoapod available here :
https://github.com/KiranPanesar/VRGCalendarView

So, the problem is on the fork project. Sorry

You don't update your method of delegate in your call :
if ([delegate respondsToSelector:@selector(calendarView:switchedToMonth:targetHeight: animated:)])

It should be :
if ([delegate respondsToSelector:@selector(calendarView:switchedToMonth:year:numOfDays:targetHeight:animated:)])

Thanks for your work

Select multiple date

Hello sir,

How to add multiple selection functionality in calendar instead of select only one date in calendar.

Is this open source?

Hi

Is this great calendar open source? and in that case what license?

Regards Nils

select date ?

Great project! I like it

I select 2012-12-15 ,but output Selected date = 2012-12-14 16:00:00 +0000, why?
can you help me?

No Year Provided in switchedToMonth: delegate method

The main delegate method for populating the calendar view doesn't provide the current year.

This is an easy fix by adding just adding the "year" parameter to the protocol method and then passing [currentMonth year] as the value when calling it in VRGCalendarView.m

ARC?

Can I use these codes with ARC projects?

dateSelected delegate method returns incorrect day

I still need to dive in to see why this is happening (whether it's my implementation or just Vurig) but at the moment, during March, the returned NSDate from the dateSelected method is correct. But when you move forward into April and beyond, the returned NSDate is a day behind the correct value. It appears correctly on the view, but not through the method.

Can anyone else replicate this?

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.