NSDatePicker replacement allowing for appearance customisation.
- custom date picker size,
- custom font size and colour,
- custom colours for date picker background, selected day, highlighted day.
- particular days can be marked with custom background, border and text colour.
- can be created in code or in Interface Builder
- Add NMDatePicker.swift and NMDatePickerDayView.swift to your project
- OS X 10.11 or later
- Swift 2.2 or later
/*
This method notifies about the date selected in the date picker.
*/
func nmDatePicker(datePicker: NMDatePicker, selectedDate: NSDate)
/*
Optional method that allows to adjust date picker height
when the number of rows is changing between months.
*/
func nmDatePicker(datePicker: NMDatePicker, newSize: NSSize)
You can use analogous methods in Objective-C code.
NMDate Picker can be used from both Swift and Objective-C code. See demo apps:
- TestApp1: example Swift application containing NMDatePicker view created in code.
- TestApp2: example Swift application containing NMDatePicker view created in Interface Builder.
- TestApp3: example Objective-C application containing NMDatePicker view created in code.
- TestApp4: example Objective-C application containing NMDatePicker view created in Interface Builder.
NMDatePicker is available under the MIT license. See the LICENSE file for more info.