experiment_id: web-retrieval-v1
fixture_id: /demos/web-component-grid-column-type-date
mode: provenance
representation: html
origin_response_id: 5fa24de8bc52a1d04230cca7f6f4bc9d
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.548Z
version_nonce: 07b7fd21dce278f49d75c6c30972dc86
generated_at_utc: 2026-11-05T09:37:27.477Z
response_nonce: 4faa645534f6d1ca023348ac4f9f5283

Date Column Type

17 of 125
ZingGrid provides a <zg-column type="date"> column type. This column type will automatically format and validate date numbers. While editing the cell, a date picker will be provided.
Result Full HTML CSS JS
Edit Download

The special default capabilities for date column type come when editing the field.

Full Code

<!DOCTYPE html>
<html class="zg-html">

<head>
  <meta charset="utf-8">
  <title>ZingGrid: Simple Grid</title>
  <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
  <style>
    .zg-body {
      background: #e6e6e6;
    }

    .zg-body zing-grid[loading] {
      height: 400px;
    }

    zing-grid[loading] {
      height: 373px;
    }
  </style>
</head>

<body class="zg-body">
  <p>The special default capabilities for <code>date</code>
    column type come when editing the field.</p>
  <zing-grid caption="<code>date</code> Column Type" search sort editor-controls="editor,remover">
    <zg-colgroup>
      <zg-column index="birth_date" header="Without Column Type" editor="disabled"></zg-column>
      <zg-column index="birth_date" header="With Column Type" type="date"></zg-column>
    </zg-colgroup>
    <zg-data data='[
        {
          "id": 1,
          "birth_date": "9-14-1974"
        },
        {
          "id": 2,
          "birth_date": "July 29, 1975"
        },
        {
          "id": 3,
          "birth_date": "8/04/2001"
        },
        {
          "id": 4,
          "birth_date": "1979-05-04T08:00"
        },
        {
          "id": 5,
          "birth_date": "2001-05-05 08:30:45.687"
        }
      ]'></zg-data>
  </zing-grid>
  <script>
    ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
  </script>
</body>

</html>
<!DOCTYPE html>
<html class="zg-html">
  <head>
    <meta charset="utf-8">
    <title>ZingGrid: Simple Grid</title>
    <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
  </head>
  <body class="zg-body">
    <p>The special default capabilities for <code>date</code>
     column type come when editing the field.</p>
    <zing-grid
      caption="<code>date</code> Column Type"
      search
      sort
      editor-controls="editor,remover">
      <zg-colgroup>
        <zg-column index="birth_date" header="Without Column Type" editor="disabled"></zg-column>
        <zg-column index="birth_date" header="With Column Type" type="date"></zg-column>
      </zg-colgroup>
      <zg-data data='[
        {
          "id": 1,
          "birth_date": "9-14-1974"
        },
        {
          "id": 2,
          "birth_date": "July 29, 1975"
        },
        {
          "id": 3,
          "birth_date": "8/04/2001"
        },
        {
          "id": 4,
          "birth_date": "1979-05-04T08:00"
        },
        {
          "id": 5,
          "birth_date": "2001-05-05 08:30:45.687"
        }
      ]'></zg-data>
    </zing-grid>
  </body>
</html>
.zg-body {background:#e6e6e6;}

.zg-body zing-grid[loading] {
  height:400px;
}
// No JS code

Interested in this demo? Modify it to your needs in ZingSoft Studio, our testing sandbox. It's free to sign up, and you can come back and edit at any time!

Edit in Studio

Demo Gallery