All Projects → ruslanskorb → Rsdayflow

ruslanskorb / Rsdayflow

Licence: mit
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.

Projects that are alternatives of or similar to Rsdayflow

React Infinite Calendar
✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.
Stars: ✭ 3,828 (+354.09%)
Mutual labels:  date, calendar, datepicker, infinite-scroll
Things Calendar
Simple but elegant datepicker for the web — inspired by Things for mac
Stars: ✭ 165 (-80.43%)
Mutual labels:  date, design, calendar, datepicker
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (-36.42%)
Mutual labels:  date, calendar, datepicker
Laydate
layDate(日期与时间组件) 是 layui 独立维护的三大组件之一
Stars: ✭ 1,066 (+26.45%)
Mutual labels:  date, calendar, datepicker
Calendar
📆 calendar 日历
Stars: ✭ 119 (-85.88%)
Mutual labels:  date, calendar, datepicker
Pg Calendar
📆 beautiful and eidetic date picker
Stars: ✭ 109 (-87.07%)
Mutual labels:  design, calendar, datepicker
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (-49.11%)
Mutual labels:  date, calendar, datepicker
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (-89.92%)
Mutual labels:  calendar, datepicker, scroll
Datepicker
Get a date with JavaScript! A datepicker with no dependencies.
Stars: ✭ 212 (-74.85%)
Mutual labels:  date, calendar, datepicker
Calendarview
A highly customizable calendar library for Android, powered by RecyclerView.
Stars: ✭ 2,862 (+239.5%)
Mutual labels:  date, calendar, datepicker
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (-97.27%)
Mutual labels:  date, calendar, datepicker
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (-56.47%)
Mutual labels:  date, calendar, datepicker
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (-67.73%)
Mutual labels:  date, design, calendar
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (-16.13%)
Mutual labels:  date, calendar, datepicker
Vue Mugen Scroll
Infinite scroll component for Vue.js 2
Stars: ✭ 532 (-36.89%)
Mutual labels:  scroll, infinite-scroll
Jedate
jeDate V6.5.0 是一款原生JS开发的 不依赖任何第三方库 大众化的日期控件,她身兼多职,虽不是万能的,但是她却是功能强大多样的美少女,她除了包含 单双面板、区域选择、 多语言、日历固定、有效无效日期、日期时间戳转换、日期加减、限制时分秒、初始化日期加减N、日期标注点、设定年月(YYYY-MM)、日期范围限制、开始日期设定、自定义日期格式、当天的前后若干天返回、时分秒选择、智能响应、自动纠错、节日识别,操作等常规功能外,根据不同的日期格式,显示不同内容,还拥有更多趋近完美的解决方案。更多的是需要你与她的亲密接触与呵护!
Stars: ✭ 433 (-48.64%)
Mutual labels:  date, datepicker
Table calendar
Highly customizable, feature-packed Flutter Calendar with gestures, animations and multiple formats
Stars: ✭ 897 (+6.41%)
Mutual labels:  date, calendar
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+6.76%)
Mutual labels:  date, calendar
Ion2 Calendar
📅 A date picker components for ionic2 /ionic3 / ionic4
Stars: ✭ 537 (-36.3%)
Mutual labels:  calendar, datepicker
Period
PHP's time range API
Stars: ✭ 616 (-26.93%)
Mutual labels:  date, calendar

RSDayFlow Build Status CocoaPods Carthage compatible

Sample

iOS 7 Calendar with Infinite Scrolling. Only need 4 lines of code to set up.

RSDayFlow is a slim fork of DayFlow with updates and extensions:

  • Visual feedback of the currently selected cell
  • Possibility to mark the date
  • Design like iOS 7
  • Much more updates

Installation

CocoaPods is the recommended method of installing RSDayFlow. Simply add the following line to your Podfile:

Podfile

pod 'RSDayFlow'

Basic Usage

Import the class header.

#import "RSDFDatePickerView.h"

Just create your date picker view and set a delegate / a data source if needed.

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    RSDFDatePickerView *datePickerView = [[RSDFDatePickerView alloc] initWithFrame:self.view.bounds];
    datePickerView.delegate = self;
    datePickerView.dataSource = self;
    [self.view addSubview:datePickerView];
}

Delegate (optional)

RSDFDatePickerView provides three delegate methods. The method datePickerView:shouldHighlightDate: asks the delegate if the date should be highlighted during tracking. The method datePickerView:shouldSelectDate: asks the delegate if the specified date should be selected. The method datePickerView:didSelectDate: called when a user click on a specific date. To use them, implement the delegate in your view controller.

@interface ViewController () <RSDFDatePickerViewDelegate>

Then implement the delegate functions.

// Returns YES if the date should be highlighted or NO if it should not.
- (BOOL)datePickerView:(RSDFDatePickerView *)view shouldHighlightDate:(NSDate *)date
{
    return YES;
}

// Returns YES if the date should be selected or NO if it should not.
- (BOOL)datePickerView:(RSDFDatePickerView *)view shouldSelectDate:(NSDate *)date
{
    return YES;
}

// Prints out the selected date.
- (void)datePickerView:(RSDFDatePickerView *)view didSelectDate:(NSDate *)date
{
    NSLog(@"%@", [date description]);
}

DataSource (optional)

RSDFDatePickerView provides three data source methods. The method datePickerView:shouldMarkDate: asks the data source if the date should be marked. The method datePickerView:markImageColorForDate: asks the data source about the color of the default mark image for the specified date. The method datePickerView:markImageForDate: asks the data source about the mark image for the specified date. The method datePickerView:markImageColorForDate: will be ignored if the method datePickerView:markImageForDate: is implemented. To use these methods, implement the data source in your view controller.

@interface ViewController () <RSDFDatePickerViewDataSource>

Then implement the data source functions.

// Returns YES if the date should be marked or NO if it should not.
- (BOOL)datePickerView:(RSDFDatePickerView *)view shouldMarkDate:(NSDate *)date
{
    // The date is an `NSDate` object without time components.
    // So, we need to use dates without time components.
    
    NSCalendar *calendar = [NSCalendar currentCalendar];
    unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit |  NSDayCalendarUnit;
    NSDateComponents *todayComponents = [calendar components:unitFlags fromDate:[NSDate date]];
    NSDate *today = [calendar dateFromComponents:todayComponents];
    
    return [date isEqual:today];
}

// Returns the color of the default mark image for the specified date.
- (UIColor *)datePickerView:(RSDFDatePickerView *)view markImageColorForDate:(NSDate *)date
{
    if (arc4random() % 2 == 0) {
        return [UIColor grayColor];
    } else {
        return [UIColor greenColor];
    }
}

// Returns the mark image for the specified date.
- (UIImage *)datePickerView:(RSDFDatePickerView *)view markImageForDate:(NSDate *)date
{
    if (arc4random() % 2 == 0) {
        return [UIImage imageNamed:@"img_gray_mark"];
    } else {
        return [UIImage imageNamed:@"img_green_mark"];
    }
}

Customization

Every view is customizable to fit your need. Create a subclass of the desired view and override the default values.

Coming Soon

  • If you would like to request a new feature, feel free to raise as an issue.

Demo

Build and run the RSDayFlowExample project in Xcode to see RSDayFlow in action. Have fun. Make it faster. Fork and send pull requests. Figure out hooks for customization.

Contact

Ruslan Skorb

License

This project is is available under the MIT license. See the LICENSE file for more info. Attribution by linking to the project page is appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].