Questions tagged [nsdatepicker]

NSDatePicker is a subclass of NSControl that provides a user interface for displaying and editing an NSDate object.

NSDatePicker is a subclass of NSControl that provides a user interface for displaying and editing an NSDate object.

NSDatePicker uses an NSDatePickerCell to implement much of the control’s functionality. NSDatePicker provides cover methods for most of NSDatePickerCell methods, which invoke the corresponding cell method

90 questions
1
vote
2 answers

Action is called twice (mouse up/down) when Target is clicked in Cocoa/objective-c

I have a NSDatePicker (target), and datePickerAction (action) - (IBAction)datePickerAction:(id)sender { if( [[[NSApplication sharedApplication] currentEvent] modifierFlags] & NSShiftKeyMask ) NSLog(@"shift pressed %@",…
prosseek
  • 182,215
  • 215
  • 566
  • 871
1
vote
1 answer

How to persist and load NSDatePicker date values

I am very new to MacOs development so apologies if this is a simplistic question: I have an app that stores and loads data to an SQlite db. A view has an NSDatePicker in graphic mode and the view can be either in 'add' or 'edit' mode ie adding or…
Colin W
  • 45
  • 2
  • 7
1
vote
1 answer

Changing default highlight color of NSDatePicker

I am subclassing NSDatePicker to implement calendar widget. I am able to change text color by setting textColor property of NSDatePicker but when I click on any field of NSDatePicker like Month/Year/Day the default color is somewhat blue. I want to…
Ankur
  • 3,584
  • 1
  • 24
  • 32
1
vote
1 answer

Trying to understand NSDatePicker

I'm desperately trying to understand swift's DatePicker. I have a need to select dates from Julian Day 0 (11/24/4714 BCE) to dates in the future. When I extract the DateComponents from the DatePicker, they do not appear to be a 'proleptic' gregorian…
Aloft
  • 31
  • 5
1
vote
3 answers

How to show year only in NSDatePicker

I want to show year component only in a NSDatePicker. I tried set/add NSDateFormatter to NSDatePicker, but with no luck. (By dragging a NSDateFormatter to NSDatePicker in nib) Is there any way to achieve this without subclassing NSDatePicker or…
Zhigang An
  • 296
  • 2
  • 13
1
vote
2 answers

NSDatePicker returns default date even when date is set programatically

I have a datePicker instance which is linked to the IBOutlet. @interface SomeClass() { __weak IBOutlet UIDatePicker *datePicker; } Now in my awakeFromNib method I am setting the minimumDate, maximumDate and date property - (void)awakeFromNib…
Burhanuddin Sunelwala
  • 5,318
  • 3
  • 25
  • 51
1
vote
0 answers

Is there a recommended way of making NSDatePicker use MY step sizes?

I'm wondering if some of you could offer advise on this. I'm trying to change the NSDatePicker's step size to another value than 1. On top of that I found that stepping minutes doesn't change the hours, nor the day. I am using the delegate method…
1
vote
1 answer

Cocoa: Working with NSDates in a time-and-timezone-independent way?

I'm working on an application that uses a lot of dates, but that doesn't rely on times at all. I'd like to store them internally as NSDates so that I can use NSDatePicker controls, built-in date functions, etc. However, I keep tripping over the fact…
David Stein
  • 866
  • 7
  • 21
1
vote
0 answers

NSDatePicker allows moving forward in time but not backward

I am using an NSDatePicker in calendar format, which should give me the opportunity to move forward and backward through the months by using the little arrowheads. In my case, I can only move forward in time. The 'left' arrow does not do anything.…
Carelinkz
  • 936
  • 8
  • 27
1
vote
2 answers

AppKit: Duration Picker View

Is there any view similar to NSDatePicker for OS X, but for selecting durations (i.e. hours, minutes and seconds) rather than entire dates. A Google search didn't bring anything useful up, and I haven't yet succeeded in customizing NSDatePicker to…
MrMage
  • 7,282
  • 2
  • 41
  • 71
0
votes
1 answer

NSDatePicker, NSTimer with initWithFireDate: fires if I choose a date/time in the past

Not sure I need to paste any code to explain this one, and it's probably something simple that i've overlooked, but i'm seeing my NSTimer with initWithFireDate: fire immediately if I choose a time in the past. This is most likely expected…
swisscheese
  • 321
  • 3
  • 12
0
votes
1 answer

iOS 5 Date Selected in DatePicker

I want to have in my DatePicker selected date, but I have a problem with lag of 2 hours. // String From Date NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setTimeStyle:NSDateFormatterFullStyle]; [dateFormatter…
0
votes
1 answer

Can I put a NSDatePicker object in a cell of NSTableView?

Right now I am just using a NSTextCell with a NSDateFormatter, I just wanted to know if this was possible, perhaps by using the . Thanks in advance!
0
votes
1 answer

Resizable NSDatePicker with graphical mode

I want to add a NSDatePicker in the sidebar of my app, to help select dates. The standard NSDatePicker only seems to come in a single size, and doesn't seem to be resizable. I've dropped the NSDatePicker component into a xib file, and added…
Z S
  • 7,039
  • 12
  • 53
  • 105
0
votes
1 answer

NSDatePicker focus on day of the month editing

I have a code similar to this: let datePicker = NSDatePicker(....) self.addSubview(datePicker) self.window?.makeFirstResponder(datePicker) When makeFirstResponder is called first element gets editing focus. For U.S region this picks day of the…
Gintaras
  • 214
  • 2
  • 8