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
2
votes
1 answer

How to get localized timer label like UIDatePickerModeCountDownTimer?

I want to get localized timer labels on my developing application. For example, "hour,hours" and "min" on en_US, "時間" and "分" on ja_JP, "ora,ore" and "min" on it_IT etc. UIDatePickerCountDownTimer mode can display them, but there seems no method to…
colori
  • 21
  • 1
2
votes
1 answer

nsdateformatter format Aug 8, 2011 11:40

how do i format Aug 8, 2011 11:40 into nsdate using nsdatepicker?Im trying to use [dateFormatter setDateFormat:@" MMM d, YYYY HH:mm"]; but it doesnt work
2
votes
2 answers

NSDateFormatter subtraction

I have a datepicker for the field "From" and "To" and I want the result of the subtraction. for example: toValue-fromValue and the result would be in hours. How to do that?
BlackM
  • 3,927
  • 8
  • 39
  • 69
2
votes
0 answers

How to add a doubleClick action to a datePicker

How can I set a doubleClick event in an NSDatePicker and make doubleClick change its selected date the same as click does? let doubleClick = NSClickGestureRecognizer(target: self, action:…
stephanie
  • 21
  • 3
2
votes
1 answer

Problem with date picker showing (main thread issue?)

Working with an AppleScript file from https://github.com/bat-tomr/dialog-node ... # 06/04/16 09:35:02 # Author: Shane Stanley # Adapted by Christopher Stone use AppleScript version "2.4" use scripting additions use framework "Foundation" use…
Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
2
votes
1 answer

How to create NSDatePicker with pop graphic calendar?

Im trying to create a text field with a calendar pop just like you see in the Calendar App of MacOS: Calendar pop I imagined it would be something native, but can't quite find how to implement it for MacOS. If you could give me tips of which…
Tassio Marques
  • 81
  • 1
  • 10
2
votes
1 answer

Show Day and Date in NSDatePicker

I am trying to do something that would seem to be very simple and surprised to find no help or similar postings anywhere. I want an NSDatePicker, which I have setup in IB and bound to property, to display as full day and date like so: Sunday, March…
Dean Davids
  • 4,174
  • 2
  • 30
  • 44
2
votes
0 answers

NSDatePicker commits subfield changes on a timer

I'm using a plain NSDatePicker control with NSYearMonthDayDatePickerElementFlag. It's the same as the date picker on the "date & time settings" panel with MM/DD/YYYY fields (the text box with 3 subfields, not the calendar portion). My users are…
velokw
  • 33
  • 4
2
votes
1 answer

How do I get the currently selected element in NSDatePicker?

I'm using an NSDatePicker view for my project. The stock date picker is not working for me. Therefore, I have subclassed NSDatePicker and am trying to handle keyboard events myself. These date pickers are placed in a table view. Question: How do I…
Maarten
  • 1,873
  • 1
  • 13
  • 16
2
votes
0 answers

NSDatePicker misbehaving with arrow keys

I have used NSDatePickers (without steppers) in the cells of a column in an NSTableView. The date pickers are used to set a duration of time in hours, minutes and seconds. If I highlight one of the controls and use the arrow keys to set the values,…
Maarten
  • 1,873
  • 1
  • 13
  • 16
2
votes
2 answers

NSDatePicker becomeFirstResponder

I have a data entry form where the first field the user wants to enter is an NSDatePicker. I wish this field to be highlighted when the user clicks a button (labelled 'New') I have tried putting in [myDatePicker becomeFirstResponder] but this has no…
arossco
  • 77
  • 1
  • 7
2
votes
1 answer

NSDatepicker buttons in graphical style

Anybody knows if it's possible to modify the date picker three little grey buttons (in its upper left corner) behavior? I want the date picker displays the current day when clicking in the middle button (the circle one). Any help will be…
ealthor
  • 33
  • 4
2
votes
1 answer

UIDatePicker for time returns very strange results

I've searched the forum and there are quite a few posts on strange behavior of the UIDatePicker, but none of the solutions solved my problem. I have a simple UIDatePicker initialized like this: self.picker = [[UIDatePicker alloc]…
LetzFlow
  • 431
  • 8
  • 17
1
vote
1 answer

Cocoa Date Picker formatting

This prints the selected datePicker's date to a textField like this: February 9, 2012 ... NSDate *theDate = [calendar dateValue]; if (theDate) { NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; NSString…
user1198008
  • 101
  • 1
  • 9
1
vote
1 answer

How not to reset the selected date in NSDatePicker (objective-c/cocoa)

I have a NSDatePicker in graphical mode, and I set it up this code is called every second to update the current time in NSDatePicker object (datePicker). - (void) updateTimerNoOne:(NSTimer *) timer { [datePicker setDateValue: [NSDate date]]; …
prosseek
  • 182,215
  • 215
  • 566
  • 871