views:

83

answers:

1

Is it possible to modify an NSDatePicker object to allow for 0 values in the month and/or day columns? Dealing with a situation where the specific day in particular is non-essiential but nice to have data (and data which the user likely doesn't know offhand to begin with).

A: 

It sounds to me like your UI does not make the user enter a specific date, but a pattern that matches multiple dates. You should use multiple fields with checkboxes for this; something like:

☑  Year: [ 2009]
☑ Month:    [12]
☐   Day:    [  ] (field disabled)

If the units that are present should always be a contiguous series (e.g., 2009-12 but never -12-03 or 2009-*-03), cut out the Year checkbox and disable each checkbox if the one before it is unchecked (with Month always enabled).

Peter Hosey