{"id":22981924,"url":"https://github.com/arc-lin/alcalendarpicker","last_synced_at":"2025-07-19T05:02:31.627Z","repository":{"id":56900579,"uuid":"94734622","full_name":"Arc-lin/ALCalendarPicker","owner":"Arc-lin","description":"简洁简单的日历选择器","archived":false,"fork":false,"pushed_at":"2019-03-14T08:08:30.000Z","size":100,"stargazers_count":21,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-13T20:03:12.513Z","etag":null,"topics":["calendar","calendarpicker","ios","objective-c"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arc-lin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-19T03:53:41.000Z","updated_at":"2023-11-24T07:42:21.000Z","dependencies_parsed_at":"2022-08-21T02:50:48.665Z","dependency_job_id":null,"html_url":"https://github.com/Arc-lin/ALCalendarPicker","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arc-lin%2FALCalendarPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arc-lin%2FALCalendarPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arc-lin%2FALCalendarPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arc-lin%2FALCalendarPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arc-lin","download_url":"https://codeload.github.com/Arc-lin/ALCalendarPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773631,"owners_count":18122035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","calendarpicker","ios","objective-c"],"created_at":"2024-12-15T02:14:20.493Z","updated_at":"2024-12-15T02:14:21.227Z","avatar_url":"https://github.com/Arc-lin.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALCalendarPicker\n\n简洁简单的日历选择器\n\n![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)\n![Pod version](https://img.shields.io/cocoapods/v/ALCalendarPicker.svg?style=flat)\n[![Platform info](https://img.shields.io/cocoapods/p/ALCalendarPicker.svg?style=flat)](http://cocoadocs.org/docsets/ALCalendarPicker)\n![Platform version](https://img.shields.io/badge/iOS_Version-\u003e8.0-red.svg)\n\n\u003cimg alt=\"简洁的日历选择器\" src=\"https://ooo.0o0.ooo/2017/06/19/59474fc1bad50.png\" width=\"40%\" height=\"75%\" /\u003e\n\n### 安装 - CocoaPods\n\n`pod \"ALCalendarPicker\"`\n\n### 特性\n1. 可配置当前日期背景颜色,文字,背景圆角度数\n2. 可配置特殊高亮日期(如预约日期),并且可以配置高亮日期背景颜色,文字,背景圆角度数\n3. 点击日期代理回调\n4. 支持设定起始日期\n5. 支持点击给日期添加选择样式\n6. 支持跳转到区间内某个年月(2018-03-28更新)\n\n### 关于时间区间\n\n目前日历的时间区间\n\n`开始时间(如果有的话) - 今天年月 - 结束时间(如果有的话)`\n\n之后的版本会有 另外的区间模式\n\n`开始时间 - 结束时间`\n\n### 使用\n\n```\n    CGSize screenSize = [UIScreen mainScreen].bounds.size;\n    // 宽度建议使用屏幕宽度 高度太低会有滚动条\n    ALCalendarPicker *calP = [[ALCalendarPicker alloc] initWithFrame:CGRectMake(0, 64, screenSize.width, 400)];\n    calP.delegate = self;\n    // 起始日期 \n//    calP.beginYearMonth = @\"2017-01\";\n    calP.hightLightItems = @[@\"2017-06-17\",@\"2017-05-22\",@\"2017-06-12\"];\n    calP.hightlightPriority = NO;\n    \n    // 高亮日期样式\n    [calP setupHightLightItemStyle:^(UIColor *__autoreleasing *backgroundColor, NSNumber *__autoreleasing *backgroundCornerRadius, UIColor *__autoreleasing *titleColor) {\n        *backgroundColor = [UIColor colorWithRed:234.0/255.0 green:240.0/255.0 blue:243.0/255.0 alpha:1];\n        *backgroundCornerRadius = @(5.0);\n        *titleColor = [UIColor colorWithRed:44.0/255.0 green:49.0/255.0 blue:53.0/255.0 alpha:1];\n    }];\n    \n    // 今天日期样式\n    [calP setupTodayItemStyle:^(UIColor *__autoreleasing *backgroundColor, NSNumber *__autoreleasing *backgroundCornerRadius, UIColor *__autoreleasing *titleColor) {\n        *backgroundColor = [UIColor colorWithRed:78.0/255.0 green:133.0/255.0 blue:222.0/255.0 alpha:1];\n        *backgroundCornerRadius = @(screenSize.width / 20); // 因为宽度是屏幕宽度,宽度 / 10 是cell 宽高 , cell宽高 / 2 为圆形\n        *titleColor = [UIColor whiteColor];\n    }];\n    \n    // 选择日期颜色\n    [calP setupSelectedItemStyle:^(UIColor *__autoreleasing *backgroundColor, NSNumber *__autoreleasing *backgroundCornerRadius, UIColor *__autoreleasing *titleColor) {\n        *backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.5];\n        *backgroundCornerRadius = @(screenSize.width / 20); // 因为宽度是屏幕宽度,宽度 / 10 是cell 宽高 , cell宽高 / 2 为圆形\n        *titleColor = [UIColor whiteColor];\n    }];\n    \n    [self.view addSubview:calP];\n```\n\n代理\n\n\n```\n/** 使用代理以响应点击事件 */\n- (void)calendarPicker:(ALCalendarPicker *)picker didSelectItem:(ALCalendarDate *)date date:(NSDate *)dateObj dateString:(NSString *)dateStr;\n\n/** 点击箭头按钮回调 */\n- (void)calendarPicker:(ALCalendarPicker *)picker willClickToYearMonth:(NSString *)yearMonth;\n\n/** 进入月历后的回调 */\n- (void)calendarPicker:(ALCalendarPicker *)picker didScrollToYearMonth:(NSString *)yearMonth isScroll:(BOOL)isScroll;\n```\n\n### 反馈\n\n使用过程中如果发现问题请issue我 或者发送邮件到arclin325@gmail.com\n\n### 证书\n\nALCalendarPicker 使用的是MIT证书,详情见LICENSE文件.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farc-lin%2Falcalendarpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farc-lin%2Falcalendarpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farc-lin%2Falcalendarpicker/lists"}