Word.ContentControlDateStorageFormat enum
Date storage formats for Word.DatePickerContentControl.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-date-picker-content-control.yaml
function changeStorageFormat(datePicker: Word.DatePickerContentControl) {
// Set the storage format to DateTime, which means the date and time will be stored in ISO format (e.g., "2024-12-31T23:59:00Z").
// The time portion will be ignored when getting/setting the value of the content control, since it's a date picker.
datePicker.dateStorageFormat = Word.ContentControlDateStorageFormat.dateTime;
}
Fields
| date = "Date" | Stores the date as a date object. |
| dateTime = "DateTime" | Stores the date as a date-time object. |
| text = "Text" | Stores the date as text. |