All Projects → Timing-GmbH → Daterangepicker

Timing-GmbH / Daterangepicker

Licence: isc
The best (?) date range picker control for OS X.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Daterangepicker

Calendarview
A highly customizable calendar library for Android, powered by RecyclerView.
Stars: ✭ 2,862 (+2171.43%)
Mutual labels:  date, daterangepicker
react-native-date-ranges
idea from react-native-dates >
Stars: ✭ 68 (-46.03%)
Mutual labels:  date, daterangepicker
Flatpickr
lightweight, powerful javascript datetimepicker with no dependencies
Stars: ✭ 14,575 (+11467.46%)
Mutual labels:  date, daterangepicker
vue-daterangepicker-component
Date range picker for Vue 1.x, based on bootstrap-daterangepicker
Stars: ✭ 22 (-82.54%)
Mutual labels:  date, daterangepicker
Chocobo-Date-Range-Picker
🗓️ Component - The Date Range Picker easier to use in AngularJS.
Stars: ✭ 23 (-81.75%)
Mutual labels:  date, daterangepicker
React Nice Dates
A responsive, touch-friendly, and modular date picker library for React.
Stars: ✭ 924 (+633.33%)
Mutual labels:  date, daterangepicker
Dateparse
GoLang Parse many date strings without knowing format in advance.
Stars: ✭ 1,365 (+983.33%)
Mutual labels:  date
Articles Zh Hans
Articles for NSHipster.cn
Stars: ✭ 113 (-10.32%)
Mutual labels:  cocoa
Date And Time
A Minimalist DateTime utility for Node.js and the browser
Stars: ✭ 99 (-21.43%)
Mutual labels:  date
Luatz
Time, Date and Timezone library for lua
Stars: ✭ 92 (-26.98%)
Mutual labels:  date
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+1314.29%)
Mutual labels:  cocoa
Calendar
📆 calendar 日历
Stars: ✭ 119 (-5.56%)
Mutual labels:  date
Calendar
📅 PHP Date & Time library that solves common problems in object oriented, immutable way.
Stars: ✭ 113 (-10.32%)
Mutual labels:  date
Datepicker
A Date Picker with Calendar for iPhone and iPad Apps.
Stars: ✭ 103 (-18.25%)
Mutual labels:  date
Horizontalpicker
DatePicker horizontal con selección smooth por día para Android.
Stars: ✭ 116 (-7.94%)
Mutual labels:  date
Feeds For Ios Developer
A list of rss feeds for iOS developers
Stars: ✭ 100 (-20.63%)
Mutual labels:  cocoa
Macassistant
Google Assistant for macOS!
Stars: ✭ 1,564 (+1141.27%)
Mutual labels:  cocoa
Titlelayout
多功能、通用的、可在布局或者使用Java代码实现标题栏; 支持沉浸式状态栏; 支持标题栏单击、双击;支持左侧返回按钮不需要手动实现页面返回; 支持左侧按钮,中间标题,右边按钮点击 左侧支持图片+文字、单独图片、单独文字;右侧支持单独图片、单独文字等。
Stars: ✭ 94 (-25.4%)
Mutual labels:  toolbar
Sbplayerclient
支持全格式的mac版视频播放器
Stars: ✭ 110 (-12.7%)
Mutual labels:  cocoa
Chrono
Date and time library for Rust
Stars: ✭ 1,780 (+1312.7%)
Mutual labels:  date

DateRangePicker - the best (?) date range picker control for OS X

Developed for and used in Timing, the automatic time/productivity tracking app for Mac.

The popover for customized date ranges Some possible looks for the control The menu for preset date ranges

Usage

Just drag the date range picker onto your Storyboard or Nib. It looks particularly good in the toolbar with segmentStyle = .Separated. If you wish to center the picker in the toolbar, I can recommend using TAAdaptiveSpaceItem.

You can observe changes in the date range by key-value-observing startDate and endDate and/or setting a target and action on the DateRangePickerView control.

Features

  • Perfect for use in a toolbar, but can also be used anywhere else
  • Date range presets: "Last 7/15/30/90/365 days", "Today/Yesterday/This week/month/quarter/year"
  • Pretty display of these presets as well as previous/future months (as e.g. "October 2015")
  • "Back" and "Forward" buttons let you shift the date range by its current duration, e.g. 7 days earlier/later, previous/next month/week/quarter/year
    • I.e. "real" month-by-month stepping through the data, not in simple 30-day intervals
  • Completely custom date ranges selectable in a popover (which can be used without the control as well)
  • Lets you specify minimum and maximum dates that can not be exceeded
    • These are reflected in the interface - the "Back"/"Forward" buttons get disabled when the date range reaches the minimum/maximum
  • Provides a sophisticated, serializable (so you can persist it between launches of your app) date range structure (implemented as a Swift enum)
  • Provides some useful date computation functions as an extension to NSDate
  • Usable from Objective-C
    • Exposes KVO/KVC-compatible startDate and endDate properties
    • Date range changes are also sent via NSControl's target-action pattern
    • Exposes -dateRangeAsData and -loadDateRangeFromData: methods that let you persist the date range in Objective-C as well
    • The NSDate extensions are also available from NSDate
  • Customizable segmented control styles
  • Localizations: English, German (feel free to add others!)
  • High code quality
    • Adheres to Cocoa "Best Practices" (if you find any antipatterns, let me know)
    • Full test coverage for the date range structure and date computations
  • Interface Builder-compatible (@IBDesignable)
  • Small and self-contained

What's missing

  • The date presets can currently not be customized (but you can easily replace them in ExpandedDateRangePickerController)
  • Date presets for "Last month/week/quarter/year" and "Next month/week/quarter/year" are currently not available (but could be added easily, and you can still reach them by selecting "This week/month/quarter/year" and then pressing "Back"/"Forward")
  • Found something else? Submit a pull request or contact me :-)

Compatibility

Requires (and tested on) OS X 10.9 or later. Looks a lot better in the toolbar with OS X 10.10 ;-)

Notes for legacy Nibs

If your Nib uses the old initWithFrame: initialization or is deflated on OS X 10.9, there is a bug with custom views in NSToolbar. This results in the date range picker's frame not being initialized correctly. In order to avoid this, I recommend the following procedure:

  • Create a dummy NSToolbarItem with an empty Custom View of the desired size and add an IBOutlet for the NSToolbarItem
  • Add the picker as a standalone view to the Nib and add an IBOutlet for it as well
  • In -awakeFromNib, programmatically set the toolbar item's view to be the picker

License

This library is available under the ISC license, which is a simplified variant of the two-clause BSD license.

If you use this library, I appreciate if you let me know @daniel_a_a on Twitter. I also have a blog.

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].