Word.ContentControlDateStorageFormat enum

Wordの日付ストレージ形式。DatePickerContentControl

注釈

API セット: WordApiDesktop 1.3

使用元

// 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;
}

フィールド

date = "Date"

日付を日付オブジェクトとして格納します。

dateTime = "DateTime"

日付を日時オブジェクトとして格納します。

text = "Text"

日付をテキストとして格納します。