Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.14 KB

File metadata and controls

35 lines (22 loc) · 1.14 KB

Date

Returns: Date

Displays a calendar UI for selecting dates which are saved as a DateTime value.

Data Type Definition Example

Data Type Definition Example

The only setting that is available for manipulating the Date property is to set a format. By default the format of the date in the Umbraco backoffice will be YYYY-MM-DD, but you can change this to something else. See MomentJS.com for the supported formats.

Content Example

Content Example

MVC View Example - displays a datetime

Typed

@(Model.Content.GetPropertyValue<DateTime>("datePicker").ToString("dd MM yyyy"))

Dynamic (Obsolete)

{% hint style="warning" %} See Common pitfalls for more information about why the dynamic approach is obsolete. {% endhint %}

@{
    @CurrentPage.datePicker.ToString("dd-MM-yyyy")
}