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
0
votes
0 answers

How to report AppKit bug I can't reproduce but have dozens of reports (NSControlTrackMouse)

Since macOS Catalina I started to get report I can't reproduce but I know where is it crashing. Register rsi has following selector in memory: _controlStopTracking:at:inView:mouseIsUp: SEGV_MAPERR has address 0x000059b575cd55f8 which is a result…
Marek H
  • 5,173
  • 3
  • 31
  • 42
0
votes
5 answers

How can i Convert (2020-02-21 06:07:21 +0000) to "21 Feb 2021 12:00 AM"?

I am using device time to get date components. this works fine for 12 hours formate but if user changes device time to 24 hours it shows wrong calculations. used the following method to convert but it always return nil. let dateAsString…
0
votes
1 answer

NSDatePicker setDate doesn't work as expected

I'm trying to set time on a NSDatePicker according to a certain offset that I have in milliseconds. When I set the time, the value that I see is off and I can't figure out why. Here is the code I use to set the picker: - (void)setDatePicker{ …
Keselme
  • 3,779
  • 7
  • 36
  • 68
0
votes
1 answer

NSDate conversion is messed due to timezone

I'm trying to put a time value on a time picker, the problem is that the time gets messed up because of time zone issue. Here's the code snippet I use: int targetmillisondsFromMidnight = [self.schedule.targetHour intValue]; // 59580000 NSDate*…
Keselme
  • 3,779
  • 7
  • 36
  • 68
0
votes
1 answer

Subclass of NSDatePicker mouseDown event changes datePicker instance

I have instantiated and initialized a subclass of NSDatePicker in AppDelegate -> applicationDidFinishLaunching and overrode mouseDown(with event: NSEvent)in the datePicker subclass. When I press the mouse button in the datePicker and break in its…
mswade
  • 5
  • 5
0
votes
0 answers

How to achieve the selecting effect of NSDatePicker by NSTextField

I wanna implement a custom TextField and its behavior just like NSDatePicker with its own data format, like 00:00:10:25 The requirement is as following: It should select text like NSDatePicker. Support the same mouse and keyboard operation, such…
0
votes
2 answers

Date picker with type time

Time picker not allowing me to set max time, i am using below lines of code : let formatter = DateFormatter() formatter.dateFormat = "hh:mm a" let locale = NSLocale(localeIdentifier: "en_US_POSIX") formatter.locale = locale as…
Pramod Shukla
  • 235
  • 2
  • 10
0
votes
1 answer

NSDatePicker nextKeyView

It seems that the NSDatePicker nextKeyView is never taken into account. I can key tab to the NSDatePicker, but never get out of it though nextKeyView is correctly set. When inside the picker, if I press the tab key, the focus goes correctly from day…
AirXygène
  • 2,409
  • 15
  • 34
0
votes
2 answers

I have two text field, I required to open datepicker and another one Timepicker in IOS

I have two textfield, if I click first one, I need to open Datepicker and when I click second textfield I need to open timepicker. but the code is availble in viewdidload so I dont know how to call it seperately. I required like when I tap first…
VyTcdc
  • 986
  • 10
  • 32
0
votes
1 answer

How to use rangeDataMode correctly in NSDatePicker?

In a Mac OS X app, I try to set the datePickerMode to use rangeDataMode because I do want to pick up a range of dates (a start date & an end date). let datePicker = NSDatePicker() datePicker.datePickerMode = .rangeDateMode However, the NSDatePicker…
Joe Huang
  • 6,296
  • 7
  • 48
  • 81
0
votes
0 answers

Why is my code only working the second time around? Delegate issue?

In Objective-C, I am trying to make a NSTextField, when clicked, open a sheet with a NSDatePicker that slides out under the text field. You select a date which closes the sheet and populates the NSTextField with the date chosen. I have found this…
GeoffCoope
  • 952
  • 9
  • 20
0
votes
0 answers

How to set/get select element from NSDatePicker

I'm trying to find out a way to set/get selected element from NSDatePicker. For example, if there is a NSDatePicker like following the selected element is year. I'd like to get which is the selected element and want to change selected element by…
Tommy
  • 159
  • 3
  • 19
0
votes
2 answers

How to I set color in NSDatePicker Graphical Mode

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

Can NSDatePicker have a contextual menu?

Ive been adding contextual menus to an OSX app I'm developing, and have successfully created a menu for a table view. However I'm having problems adding a contextual menu to a NSDatePicker. I've connected the 'menu' outlet to a NSMenu, but right…
Will Bolam
  • 309
  • 1
  • 3
  • 9
0
votes
1 answer

NSDatePicker vs. NSTextField border/bezel

I'm trying to make a textual NSDatePicker object look exactly like a NSTextField. If I take the standard objects it looks like this: The only way I seem to find is making both objects bordered which looks like this: Does anyone know how to make…
Daniel
  • 436
  • 3
  • 14