Code Monkey home page Code Monkey logo

zjcalender's Introduction

ZJCalender

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

ZJCalender is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ZJCalender'

Author

[email protected]

License

ZJCalender is available under the MIT license. See the LICENSE file for more info.

MoreInfo

支持很多功能的日历, 由于日历为单例, 数据可以在多个不同的日历之间共享, 另外支持法定节假日, 农历什么的想添加也很容易, 完全满足酒店短租App的需求和逻辑, 例如: 起始日不能为已租日, 终止日可以为已租日, 起始终止时间不能包含已租日, 不同的错误不同回调, 控件相较于知名日历控件比较轻, 也几乎能满足使用, 以下只举几个例子看效果... 大家也可以下载App: 旅途逸居看具体使用效果.

效果

1.简单多选全屏模式

1.多选半屏模式

1.多选全屏模式

类说明:

1.ZJCalenderController 日历控制器(全屏日历)

attribute:

calenderTitle(日历标题)
closeBlock(关闭日历回调)

2.ZJCalenderView 日历视图 (局部视图日历)

attribute:

selectedEnable(日历是否可选)
closeBlock(关闭日历回调)

method:

/**
实例化方法, ZJCalenderModePartScreen模式无法更改size
*/
- (instancetype)initWithFrame:(CGRect)frame calenderMode:(ZJCalenderMode)calenderMode;

/**
刷新数据
*/
- (void)reloadData;

3.ZJCalenderConst 常量宏 (各种颜色, 字体)

const

ZJCalenderThemeColor [主题色]
ZJCalenderHighlightThemeColor [高亮主题色]
ZJCalenderBackgroundColor [背景色]
ZJCalenderCommonTextColor [文字颜色]
ZJCalenderDisabledTextColor [不可选文字颜色]
ZJCalenderSelectedTextColor [选中文字颜色]
ZJCalenderSelectedBackgroundColor [选中背景色]
ZJCalenderDeselectedBackgroundColor [未选中背景色]
ZJCalenderMonthTitleColor [月标题色]
ZJCalenderMonthTitleBackgroundColor [月背景色]
ZJCalenderFirstSelectedText [第一次选中文字]
ZJCalenderSecondSelectedText [第二次选中文字]
ZJCalenderDisabledSelectedText [不可选文字]

4.ZJCalenderDateManager 日历控制单例对象 (日期, 功能, 回调)

attribute:

disabledDaysArray(不可选日期数组 @"2015-01-01"格式字符串)
disabledDateArray(不可选日期数组 NSDate  上面一个参数只会有一个生效, disabledDateArray优先)
selectedSinceToday(从今天开始可选, NO则从本月第一天开始可选 默认NO)
text(日期下面的统一文字)
simpleMode(简单模式, 只显示日期 ***此模式需每次推出日历之前设置一次***)
monthCount(传入生成模型的月份数量 默认4个月)
minSeletedDays(最少选择天数)
maxSeletedDays(最多选择天数)
multipleEnable(是否支持多选, 默认支持, 若不支持多选, block回调传选择日期相同)
selectedFail(点击失败回调)
finishSelect(选择完成回调 取消选择两天也会回调 传nil)
loadComplete(加载完成回调)
selectFinished(是否选中完成)

method:

/**
单粒快速创建
*/
+ (ZJCalenderDateManager *)sharedManager;

/**
生成模型数组
*/
- (void)getCalenderDateComplete:(completeBlock)complete;

/**
是否该显示文本
*/
- (BOOL)showTextWithDate:(NSDate *)date;

/**
重新获取日历的日期
*/
- (void)refreshDateComplete:(loadCompleteBlock)complete;

/**
清除选择
*/
- (void)clearSelection;

zjcalender's People

Contributors

syik avatar

Watchers

James Cloos avatar JayDaniel avatar

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.