# Date cell type

# Overview

The 'date' cell type is used to display a date in a cell or column.

# Usage

To trigger the date cell type, use the option type: 'date' in the columns array or cells function. The date cell uses Pikaday datepicker (opens new window) as the UI control. Pikaday uses Moment.js (opens new window) as a date formatter.

Note that date cell requires additional modules :

<script src="https://cdn.jsdelivr.net/npm/moment@2.29.1/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pikaday@1.8.2/pikaday.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pikaday@1.8.2/css/pikaday.css">

All data entered into the date-type cells are validated against the default date format DD/MM/YYYY unless another format is provided. If you enable the correctFormat config item, the dates will be automatically formatted to match the desired format.

# Basic example