This template formats Date object and displays default browser time picker in edit mode. Keep in mind: time attribute that stores Date object instance will be stored with the date of January 1st, 1970 UTC.

Implementation

  • Open TimeCell implementation on github

Interface declaration

interface TimeCell extends Cell {
    type: 'time';
    time?: Date;
    format?: Intl.DateTimeFormat;
}
Property nameTypeProperty description
typedateType of cell template
date?DateDate object, optional
format?Intl.DateTimeFormatFormats time, if undefined formats it according to current browser locale