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 a bullet symbol
- can be created in code or in Interface Builder
- Add NMDatePicker.swift and NMDatePickerDayView.swift to your project
- Set NMDatePicker object as a delegate and implement delegate methods
- OS X 10.11 or later
- Swift 5.0 or later
/*
This method notifies about the date selected in the date picker.
*/
func nmDatePicker(_ datePicker: NMDatePicker, selectedDate: Date)
/*
Optional method that allows to adjust date picker height
when the number of rows is changing between months.
*/
optional 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.
NMDatePicker is available under the MIT license. See the LICENSE file for more info.