2021-03-20

Sitefinity Classic Editor DateTime format

Issues

  • Content Edit Page – Show mm/dd/yyyy

screen1

  • Content Listing Page – Show unknown (AM / PM) time

screen2

What I did to resolve it?

  1. Add a new ViewMap Control
Advanced Settings → Controls → ViewMap → <Create new>
HostType: Telerik.Sitefinity.Web.UI.Fields.DateField, Telerik.Sitefinity
Layout: ~/Utils/Extensions/DateFieldExtended.ascx

Sample: https://gist.github.com/hawjeh/897467cf33ef6199a68c48641004c5f7

  1. Update Content Type Listing DateTime Format
Advanced Setting → DynamicModules → Controls → <Custom Module Backend Definition> 

→ Views → <Module Backend List> → View Modes → Grid → Columns → <Field> → Client Template →

<span>{{ (Start) ? Start.sitefinityLocaleFormat(‘dd/MM/yyyy hh:mm tt’): ‘-‘ }}</span>

  1. Do for LastModified, DateCreated fields too.

Resolved Screen

  • Content Edit Screen

screen3

  • Content Listing Screen

screen4

References