> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Date and Time Columns

> Nextedy RISKSHEET supports three temporal column types for displaying and editing date and time values: `date` (date only), `datetime` (date and time), and `time` (time only).

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Column Type Values

| Type Value | Polarion Storage | Internal Format | Display Example    | Description                                              |
| ---------- | ---------------- | --------------- | ------------------ | -------------------------------------------------------- |
| `date`     | DateOnly         | `yyyy-MM-dd`    | `2025-03-15`       | Date without time component. Calendar picker for editing |
| `datetime` | Date             | ISO DateTime    | `2025-03-15 14:30` | Date with time component. Calendar + time picker         |
| `time`     | TimeOnly         | `hh:mm:ss`      | `14:30:00`         | Time without date component. Time-only entry             |

## Column Properties

| Name             | Type      | Default                                | Description                                                                                                                                                                                          |
| ---------------- | --------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`             | `string`  | Auto-generated from header or bindings | Unique column identifier                                                                                                                                                                             |
| `type`           | `string`  | Auto-detected from bindings            | Set to `date`, `datetime`, or `time`. If not specified, Risksheet infers the type from the Polarion field definition                                                                                 |
| `header`         | `string`  | Required                               | Display text shown in the column header                                                                                                                                                              |
| `bindings`       | `string`  | Same as `id`                           | Polarion field ID. Must match the work item field ID in Polarion                                                                                                                                     |
| `width`          | `number`  | See application                        | Column width in pixels                                                                                                                                                                               |
| `minWidth`       | `number`  | See application                        | Minimum width in pixels that the column can be resized to                                                                                                                                            |
| `format`         | `string`  | None                                   | Custom display format string (e.g., `"dd/MM/yyyy"`, `"MM-dd-yyyy"`). Controls how the date renders in the cell. See [Format Strings](#format-strings)                                                |
| `readOnly`       | `boolean` | `false`                                | Controls whether the column cells can be edited by users. Automatically set to `true` for system date fields (`created`, `updated`). Note: **case-sensitive** -- must be `readOnly` with uppercase O |
| `level`          | `number`  | `1`                                    | Hierarchical level at which this column appears (1 = top level, 2 = second level)                                                                                                                    |
| `headerGroup`    | `string`  | None                                   | Name of the header group this column belongs to for multi-level column headers                                                                                                                       |
| `headerGroupCss` | `string`  | None                                   | CSS class name(s) to apply to the header group row                                                                                                                                                   |
| `collapseTo`     | `boolean` | `false`                                | When `true`, this column remains visible when its header group is collapsed                                                                                                                          |
| `filterable`     | `boolean` | `true`                                 | Controls whether users can filter the risksheet by values in this column                                                                                                                             |
| `cellCss`        | `string`  | None                                   | CSS class name(s) to apply to all cells in this column                                                                                                                                               |

<Warning title="Case-Sensitive readOnly Property">
  The `readOnly` property is **case-sensitive**: `readOnly: false` works correctly, but `readonly: false` does **not**. This is a very common configuration mistake, especially when making upstream linked item date columns editable. Always use the camelCase form `readOnly`.
</Warning>

## Type Conversion

Risksheet automatically converts between different date representations when reading from and writing to Polarion. The conversion system handles multiple source types transparently:

| Source Type                      | Target Format      | Description                                                                                                 |
| -------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------- |
| Polarion Date objects            | ISO format strings | Standard Polarion date fields are converted to `yyyy-MM-dd` for dates                                       |
| Java Date/Calendar objects       | ISO format strings | Legacy Polarion date values are normalized                                                                  |
| ISO string format (`yyyy-MM-dd`) | Parsed directly    | Date strings in ISO format are accepted without conversion                                                  |
| ISO string format (`hh:mm:ss`)   | Parsed directly    | Time strings in ISO format are accepted without conversion                                                  |
| String fields                    | Date objects       | A string field can be configured as a `date` column; Risksheet attempts to parse the string value as a date |
| Integer/Float fields             | Not applicable     | Numeric fields cannot be displayed as date columns                                                          |

<Note title="Flexible Field Backing">
  You can display any Polarion field as a date column by setting `type: date` in the column configuration, regardless of the underlying Polarion field type. For example, a string field can be shown as a date column if its values contain parseable date strings.
</Note>

## Display Formatting

### Default Behavior

Date columns with `type: date` parse `YYYY-MM-DD` format strings to local time `Date` objects before applying any configured format. The parsing uses local time rather than UTC to avoid off-by-one date shifts from timezone conversion.

### Format Strings

The `format` property accepts format strings compatible with the localization library. Common patterns:

| Format String  | Output Example | Description                    |
| -------------- | -------------- | ------------------------------ |
| `"yyyy-MM-dd"` | `2025-03-15`   | ISO date (default)             |
| `"dd/MM/yyyy"` | `15/03/2025`   | European day-first format      |
| `"MM/dd/yyyy"` | `03/15/2025`   | US month-first format          |
| `"dd.MM.yyyy"` | `15.03.2025`   | German/Central European format |
| `"d MMM yyyy"` | `15 Mar 2025`  | Short month name               |

### Culture-Dependent Formatting

The `global.culture` property in the sheet configuration affects how dates (and numbers) are formatted and parsed. For example, setting `culture: de` under `global` changes the default date display to German locale conventions.

```yaml theme={null}
global:
  culture: de
```

See [Culture and Localization Codes](/risksheet/reference/culture-codes) for the full list of supported culture codes.

<Warning title="Format Property Bug in Version 24.5.0">
  In version 24.5.0, adding a `format` property to date-only columns caused save errors due to a timezone fix regression. The `format` property triggered incorrect timezone handling that prevented successful saves.

  **Workaround:** Remove the `format` property from date-only columns and enter dates in `YYYY-MM-DD` format directly in the cell instead of using the calendar popup. This issue was resolved in subsequent versions.
</Warning>

## System Date Fields

Certain Polarion system fields are date-typed and always read-only:

| Field Bindings | Type       | Read-Only | Description                  |
| -------------- | ---------- | --------- | ---------------------------- |
| `created`      | `datetime` | Always    | Work item creation timestamp |
| `updated`      | `datetime` | Always    | Last modification timestamp  |

These fields have `readOnly` automatically set to `true` by Risksheet and cannot be made editable.

## Upstream Date Columns

To display and edit a date attribute from an upstream linked work item (e.g., a requirement's due date shown on the risk item row):

1. Set `bindings` to the linked item's date field using dot notation (e.g., `req.dueDate`)
2. Set `readOnly: false` (case-sensitive, uppercase O) to enable editing
3. Optionally configure a `format` string for display

```yaml theme={null}
columns:
  - id: reqDueDate
    header: Req. Due Date
    bindings: req.dueDate
    type: date
    readOnly: false
    width: 120
    level: 1
```

<Tip title="Making Upstream Columns Editable">
  Upstream columns need `readOnly: false` (case-sensitive with uppercase O) to be editable. Without this property, upstream columns default to read-only since they reference data from another work item.
</Tip>

## Date Entry Behavior

When editing a date cell, Risksheet provides a calendar date picker. Users can also type dates directly into the cell. The accepted input format depends on the column configuration:

| Scenario                 | Accepted Input                                     |
| ------------------------ | -------------------------------------------------- |
| No `format` property set | `YYYY-MM-DD` (ISO format)                          |
| `format` property set    | Date string matching the configured format pattern |
| Calendar picker          | Click to select date from calendar dropdown        |

<Warning title="Direct Date Entry Format">
  When the `format` property is removed (as a workaround for the v24.5.0 bug), enter dates in `YYYY-MM-DD` format directly in the cell. The calendar popup may not be available in all configurations.
</Warning>

## Comparison Mode

Date columns participate in baseline comparison mode. When comparing two document revisions:

* Changed date values are highlighted with comparison styling
* Tooltips show the old value and new value
* Added rows display date values with "new row" indicators
* Removed rows display date values with "removed row" indicators

The comparison applies to both master item date columns and downstream task date columns.

## Read-Only Field Protection

The following system fields are always read-only and cannot be edited through Risksheet, even if `readOnly: false` is set:

* `id` -- Work item ID
* `status` -- Work item status
* `type` -- Work item type
* `project` -- Project identifier
* `outlineNumber` -- Document outline number
* `created` -- Creation timestamp
* `updated` -- Last modification timestamp
* `author` -- Work item author
* `resolution` -- Work item resolution

Attempts to save changes to these fields are silently ignored.

## Text Wrapping in Date Cells

Date columns render as single-line values by default. Text wrapping is not controlled by a column-level property. To wrap longer cell content, define the wrapping rules in the sheet configuration `styles` section and reference them from the column via `cellCss`.

## Complete Example

An FMEA configuration with target date tracking, completion dates on downstream tasks, and system timestamps:

```yaml theme={null}
global:
  culture: en
columns:
  - id: targetDate
    header: Target Date
    type: date
    bindings: targetDate
    width: 120
    level: 2
    headerGroup: Schedule
    readOnly: false
    filterable: true
  - id: completionDate
    header: Completed
    type: date
    bindings: task.completionDate
    width: 120
    headerGroup: Schedule
    readOnly: false
  - id: reviewDate
    header: Review Date
    type: date
    bindings: reviewDate
    width: 120
    level: 2
    headerGroup: Schedule
    readOnly: false
  - id: lastModified
    header: Last Updated
    type: datetime
    bindings: updated
    width: 150
    readOnly: true
  - id: createdOn
    header: Created
    type: datetime
    bindings: created
    width: 150
    readOnly: true
  - id: reqDueDate
    header: Req. Due Date
    bindings: req.dueDate
    type: date
    readOnly: false
    width: 120
    level: 1
    headerGroup: Requirement
```

This configuration provides:

* Editable `targetDate` and `completionDate` columns for risk item scheduling
* Editable `reviewDate` for tracking review milestones
* Read-only `lastModified` and `createdOn` columns displaying system timestamps
* Editable upstream `reqDueDate` showing the linked requirement's due date

## Related Pages

* [Column Type Reference](/risksheet/reference/columns/column-types) -- overview of all column types
* [Data Types](/risksheet/reference/columns/data-types) -- complete data type reference
* [Culture and Localization Codes](/risksheet/reference/culture-codes) -- locale settings affecting date formats
* [Configure Date Fields](/risksheet/guides/columns/date-field-configuration) -- step-by-step how-to guide
* [Configuration Properties Index](/risksheet/reference/configuration/properties-index) -- global configuration reference
* [Supported Field Types](/risksheet/reference/fields/supported-field-types) -- Polarion field type mappings

<LastReviewed date="2026-06-24" />
