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 getting stuck typing the digits into the year sub-field (though the behavior is present on the month and day fields too).
You can reproduce the problem using the Date & Time settings panel. Uncheck "Set date & time automatically" and click on the current year part of the field, 2014. Now just type 19 and pause. After about 1 second it fires some event and changes the date to 1969.
My users don't seem to type as fast as the NSDatePicker
expects them to. Some event fires, calling some internal function NSDatePickerCell(NSTextFieldWithStepperDatePickerInternal)_userEditExpired:
, well before many of my users can finish entering the 4 digit year. The timeout is reset after each keystroke, and seems about a second or a little less.
Does anybody know of a way to defeat that behavior without resorting to writing a whole new date picker? I'd be happy with a way to just change the timeout to something longer, maybe about 5 seconds, so the slower typists can get all 4 digits entered without the event firing and accepting their input before they're finished.