{"id":2512,"url":"https://github.com/nbwar/NWCalendarView","last_synced_at":"2025-08-03T00:31:52.933Z","repository":{"id":35581836,"uuid":"39854360","full_name":"nbwar/NWCalendarView","owner":"nbwar","description":"An availability calendar implementation for iOS","archived":false,"fork":false,"pushed_at":"2016-08-03T18:18:04.000Z","size":47,"stargazers_count":60,"open_issues_count":16,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-16T04:31:21.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nbwar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-28T19:45:32.000Z","updated_at":"2021-05-27T12:26:31.000Z","dependencies_parsed_at":"2022-08-29T18:01:51.047Z","dependency_job_id":null,"html_url":"https://github.com/nbwar/NWCalendarView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbwar%2FNWCalendarView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbwar%2FNWCalendarView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbwar%2FNWCalendarView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbwar%2FNWCalendarView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbwar","download_url":"https://codeload.github.com/nbwar/NWCalendarView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510718,"owners_count":17931756,"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":[],"created_at":"2024-01-05T20:16:15.598Z","updated_at":"2024-12-06T18:30:32.741Z","avatar_url":"https://github.com/nbwar.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Calendar","Other free courses"],"readme":"# NWCalendarView\n\nNWCalendar View is an iOS control that displays a calendar. It is perfect for appointment or availibilty selection. It allows for selection of a single date or a range. It also allows to disable dates that are unavailable.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://i.imgur.com/XsIX6F6.png\" height=400 width=400/\u003e\n\u003c/p\u003e\n\n\n## Sample Usage\n\n\n```swift\n@IBOutlet weak var calendarView: NWCalendarView!\n\noverride func viewDidLoad() {\n  super.viewDidLoad()\n\n  calendarView.layer.borderWidth = 1\n  calendarView.layer.borderColor = UIColor.lightGrayColor().CGColor\n  calendarView.backgroundColor = UIColor.whiteColor()\n\n\n  var date = NSDate()\n  let newDate = date.dateByAddingTimeInterval(60*60*24*8)\n  let newDate2 = date.dateByAddingTimeInterval(60*60*24*9)\n  let newDate3 = date.dateByAddingTimeInterval(60*60*24*30)\n  calendarView.disabledDates = [newDate, newDate2, newDate3]\n  calendarView.selectionRangeLength = 7\n  calendarView.maxMonths = 4\n  calendarView.delegate = self\n  calendarView.createCalendar()\n}\n```\n\n\n## Customization\n\nMake sure to call `createCalendar()` setting your custom options\n\n\n**disable dates**\n```swift\n// Takes an array of NSDates\ncalendarView.disabledDates = [newDate, newDate2, newDate3]\n```\n\n**Set Max Months**\n\nYou may only want to allow going 4 months into the future\n```swift\ncalendarView.maxMonths = 4\n```\n\n**Set selection Range** (defaults to 0)\n\n```swift\nselectionRangeLength = 7\n```\n\n## Delegate\n\n**didChangeFromMonthToMonth(fromMonth: NSDateComponents, toMonth: NSDateComponents)**\n```swift\nfunc didChangeFromMonthToMonth(fromMonth: NSDateComponents, toMonth: NSDateComponents) {\n  println(\"Change From month \\(fromMonth) to month \\(toMonth)\")\n}\n```\n\n**didSelectDate(fromDate: NSDateComponents, toDate: NSDateComponents)**\n```swift\nfunc didSelectDate(fromDate: NSDateComponents, toDate: NSDateComponents) {\n  println(\"Selected date \\(fromDate.date!) to date \\(toDate.date!)\")\n}\n```\n\n## TODO\n1. Enable going into the past\n2. Dynamic adding of months when scrolling in to past\n3. Make all aspects customizable (font, colors, etc..)\n4. Turn into cocoapod\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbwar%2FNWCalendarView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbwar%2FNWCalendarView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbwar%2FNWCalendarView/lists"}