Basic Examples (3)
Display a date setter control:
Dynamically update the value of x:
Display a DateObject to a specific granularity:
Scope (4)
Initialize the interface using a supported date specification:
Use DateSetter as a control within Manipulate:
Make an interface for controlling AbsoluteTime:
Make an interface for controlling a DateString expression:
Options (28)
Appearance (10)
Set the appearance to match a DateString specification:
Use a list of DateString specifications. Valid granularities automatically become controls while other strings display as written:
Use Rule to suggest the control type. None suppresses the control:
Use a control like SetterBar or PopupMenu instead of the default:
The DateString specification "MonthName" and its short variants are special cases. They provide a labeled control to set the month value:
Use "Calendar" to create a day calendar control:
Use PopupMenu to hide the day calendar until you click the control:
Use a pure function to specify the appearance of an individual control. The first Slot is automatically filled with the appropriate Dynamic expression:
For date elements that have a finite number of values, like the months, use a second Slot to indicate labeled date elements:
Use a pure function for the Appearance option to set the overall appearance. Named slots with date elements are replaced with the corresponding granularity control:
Background (2)
Change the background color:
Background is ignored if the Appearance is a pure function:
BaseStyle (2)
Use a named style:
Affect the specific control types using their box options:
DateFormat (4)
DateFormat only affects the underlying DateObject expression:
If specifying individual DateString elements then the delimiter is automatically chosen:
Use an Association to specify both the elements and delimiters. The "Elements" key is used to list the DateString elements and specify the delimiter with the "Delimiters" key:
Use Appearance to alter the automatic appearance of the interface without affecting the underlying DateObject:
Enabled (2)
By default, DateSetter is enabled:
Be setting Enabled → False, the interface is disabled but visible in its current state:
ImageMargins (1)
Add margins outside the date setter:
ImageSize (2)
Set the width of the date setter:
The display clips if ImageSize is too small:
LabelingFunction (3)
The individual granularity controls are automatically labeled using Tooltip. Hover over the individual controls to see the calendar granularity that they affect:
Use LabelingFunction→None to suppress all labels:
Use directions Left, Right, Above and Below to insert granularity control labels within the interface:
TimeZone (1)
Use TimeZone to set the time zone specification of the underlying DateObject:
Possible Issues (6)
DateSetter only accepts allowed granularities for the CalendarType option:
Use CalendarData to find available granularities for the given calendar:
Appearance components are case-sensitive. Any misspelled components pass through as written:
Correct any spelling mistakes to fix the display:
Improperly specified Appearance components display as a warning:
Correct any mistakes in the indicated component: