0

I have a file list with creation time and I want to show it as different colour in NSDataPickerView. like this How can I achieve this? I've tried self.datePicker.textColor = NSColor.redColor() but it does not work.

Willjay
  • 6,381
  • 4
  • 33
  • 58

2 Answers2

0

Try this :

self.datePicker.setValue(NSColor.redColor(), forKey: "textColor")

I am not sure, it will work for NSDatePicker or not, but its working for UIDatePicker!

iRiziya
  • 3,235
  • 1
  • 22
  • 36
0

The below works self.datePicker.backgroundColor = NSColor.yellowColor()

enter image description here

Debasis Das
  • 102
  • 7