Giter VIP home page Giter VIP logo

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

dslcalendarview's Issues

Takes time to open

I implemented this in xcode. I have a problem. Whenever the view controller that has the calendar class opens, it takes a couple seconds to actually open. What can I do to fix that?

Choice Mode for Calendar

Please provide choice mode like

  1. Date Selection Mode None
  2. Date Selection Mode Single
  3. Date Selection Mode Multiple

How to add event marker in Calendar

hai,

I want to add dot marker for particular event in month view like Kal calender.Is it possible ?if yes how it possible.....Advance thanks..

Reload DSLCalendarView

I am using DSLCalendarView for displaying schedules. When month is changed, didChangeToVisibleMonth gets called. I am updating the data on this event. But I want the calendar to reload at this event too. Is it possible to refresh/reload the DSLCalendarView ?

show current date when calendar loads

I want to show current date selected when calendar loads.

I've tried using,

NSDate *today = [NSDate date];
NSCalendar *gregorian = [[NSCalendar alloc]
                         initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *component = [gregorian components:(NSCalendarUnitDay|NSCalendarUnitMonth|NSCalendarUnitYear) fromDate:today];

[_calendarView setSelectedRange:[[DSLCalendarRange alloc] initWithStartDay:component endDay:component]];

But its selecting each and every day into the calendar.

Any solution?

Disable dates.

I am developing an application which allows a user to book appointment. I want to show only the doctor availability days in the calendar. Say the Dermatologist visits the hospital only on Eg: 4,8,9,10,20,21,23,25,26 i want to disable all the other days from the calendar and show a different background / color. How do i do that?

Device rotation

When rotating device, the calendar is not being showed completely. The solution might be adjusting the tiles height/width to the superview bounds.
captura de pantalla 2013-06-11 a la s 11 22 45

iPhone 6/6 Plus calendar width

See screenshot. The width is fixed at 320 and does not adjust to the width.

I think the proper way is to use whatever width the view has, and calculate the width of each date accordingly.

ios simulator screen shot sep 11 2014 3 19 59 pm

Fetch 'Year' alone.

How to get the year alone in Calendar view? Please let me know the sample code.

Compare dates so that to change background accordingly

I want to change date background as per some conditions,

For e.g. If it's January, and I've 11,14,15,16,20,25 dates in an NSArray, now when user showing Januaray month into the calendar, I want to mark it blue background, and others should be normal. Where I can check for this?

I reached to drawBackground method of DSLCalendarDayView, I think there its possible, but then how do I compare it with the date and the dates I've in NSArray?

Problem in Storyboard

It does not work in storyboard (xcode 4.6.3, ARC)
It shows as below image, Please check it out.

1

ability to select start and end date with single tap individually

Hi,

First of all thanks for a great calendar. I've been trying to modify your code to allow a user to select a start and end date by tapping and automatically selecting the dates in between. Do you have any plans to implement this feature?

This is what I have tried so far:

  • (DSLCalendarRange*)calendarView:(DSLCalendarView *)calendarView didDragToDay:(NSDateComponents *)day selectingRange:(DSLCalendarRange *)range {

    if (!self.startDate) {
    
        //        self.startDate = [self.dateFormatter dateFromString:[NSString stringWithFormat:@"%d/%d/%d",range.startDay.month, range.startDay.day,range.startDay.year]];
        //self.startDate = range.s
    
        self.startDate = range.startDay;
    
        self.hasSelectedStartDate = YES;
    
        return [[DSLCalendarRange alloc] initWithStartDay:self.startDate endDay:self.startDate];
    
    
    
        NSLog(@"start date set to: %@",self.startDate);
    }
    else if (self.startDate && !self.endDate)
    {
    
        //self.endDate = [self.dateFormatter dateFromString:[NSString stringWithFormat:@"%d/%d/%d",range.startDay.month, range.startDay.day,range.startDay.year]];
        self.endDate = range.endDay;
    
        NSLog(@"Start date is: %@",self.startDate);
        NSLog(@"end date set to: %@",self.endDate);
    
        return [[DSLCalendarRange alloc] initWithStartDay:self.startDate endDay:self.endDate];
    
    
    } else if (self.startDate && self.endDate)
    {
        return [[DSLCalendarRange alloc] initWithStartDay:self.startDate endDay:self.endDate];
    
        self.hasSelectedStartDate = NO;
    }
    NSLog(@"Select range programattically");
    

    }

I also modified the touchesEnded method in DSLCalendarView.m

  • (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

//added this part of code

if ([self.delegate respondsToSelector:@selector(hasSelectedStartDate)]) {
    self.flag = [self.delegate performSelector:@selector(hasSelectedStartDate)];
    NSLog(@"Value: %hhd",self.flag);
}

if (!self.draggedOffStartDay && [self.draggingStartDay isEqual:touchedView.day] && !self.flag) {
self.selectedRange = [[DSLCalendarRange alloc] initWithStartDay:touchedView.day endDay:touchedView.day];
}
}

But this breaks the drag to select functionality. Any help/guidance would be greatly appreciated.

Transparent Background Number Day

Hello everyone,

I need to make the background transparent numbers of this calendar but unfortunately I encountered some problems because I noticed that if I insert a transparent background many numbers overlap for example, in addition to the number of the month 31 am also 32, 33, 34, etc. .. . how can I prevent a transparent background overlaps the numbers of the calendar? anyone has any solution for this?

(Single Day Selection) && (Don't allow selection before today) not working

The developer created an outstanding work, but I want to report a bug I found. He left commented one life of the code where you can change some BOOL to Yes or NO when asked if the user is allowed to select a day before today and if a user can make a selection with more than one day. By default, both features are set to NO, and the app by default allows more than one day selection and allows the user to selection any date, including a date before today. If you change ONE of this features to YES, the code works and you get what you expect, but if you change the two features to YES (i.e If you try to only let a single day selecton AND dont allow any selection before today), the method doesn't work.

Add highlighting to dates that have events.

I have DSLCalendarView loading in perfectly and syncing up with EventKit and when selecting a date allows you to see events in your iOS calendar from that day. However I want to take it a step further and add highlighting to dates that have events. So for example if EventKit had 2 events on Friday the 22nd of May I would like to highlight the date in the date picker, anyone have any knowledge about where to start on this?

Error At Load

Hi,
Have problem on DSLCalendarDayView.m at line 179:
CGSize textSize = [_labelText sizeWithFont:textFont];
EXC_BAD_ACCESS

how can i fix?
The project is ARC

How to add DSLCalendarView programmatically?

Hi Pete!
Thanks for developing this!

I've found that now is only possible way to add calendar - is via IBOutlet.
Trying to add it programmatically - my result is only top view with month/year and days of week header with left/right arrows. And there is no days grid. Sadly.

I am not big fan of Xib & storyboards, sorry :)
So my question is - how to add DSLCalendarView programmatically?

Thanks!

iOS 8 update?

Any chance the code can be updated to use iOS 8 and not use deprecated methods?

Wrong day count for some months

Hi,
I'm experiencing some troubles with this calendar. In some months i don't get the right number of days, as depicted below:
img_0971

This happens although the "dayAsDate" and "labelText" in DSLCalendarDayView seem to be tuned, when one print them out in the console.

Does anybody know what possibly could cause this?

Thanks in advance

Change start day of week in calendar

Right now, we're getting days as Sun Mon Tues Wed Thu Fri Sat... Can I set day to start with Mon.. So the calendar will be displayed like, Mon Tue Wed Thu Fri Sat Sun..? Is it possible?

Restrict date / month selection

Suppose my current date is Jul 3, 2013, I want to restrict date selection from DSLCalendarView, something like,

  1. User can't select before date from the above date

  2. Only able to select a current month date

  3. Can I set something like, user can only select dates between current month to next to next month, for eg. As current month is July, user can able to select any dates between, July, August, September.

  4. User cannot select a weekend date?

I don't know I can achieve this with the current version of DSLCalendarView or not, please do let me know asap.

Use isKindOfClass instead of isMemberOfClass in drawRect

In order to be able to subclass to customize, drawRect method of DSLCalendarMonthSelectorView.m and DSLCalendarDayView.m should probably use isKindOfClass instead of isMemberOfClass, because when subclassing these two classes, the subclass is not a member of the class, and therefore the drawRect uses default drawing.

Programmatically choosing dates

How can I programmatically choose dates? or Start with initial dates are chosen?

I tried

NSDateComponents *startDateForRange = [startingDate dslCalendarView_dayWithCalendar:self.calendarView.visibleMonth.calendar];
NSDateComponents *endDateForRange = [EndDate dslCalendarView_dayWithCalendar:self.calendarView.visibleMonth.calendar];
DSLCalendarRange *newRamnge=[[DSLCalendarRange alloc] initWithStartDay:startDateForRange endDay:endDateForRange];
[self calendarView:self.calendarView didDragToDay:endDateForRange selectingRange:newRamnge];

//[self calendarView:self.calendarView didSelectRange:newRamnge];

//startingDate and EndDate are valid nsdates

Hey! Tap first and last date and get a range

Hey guys, sorry, but i can't figure out how to actually get the first and the last date by tapping first and last not by dragging from first to last and getting the range. Is it possible to do it with taps?????????

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.