Date Templating with Javascript

The Date field allows content writers to add a date that represents a calendar day.

Usage

Here's an example of how to access a Date value using the PrismicDOM.date object.

Copy
var PrismicDOM = require('prismic-dom');

var date = PrismicDOM.Date(document.data.postDate);