Schema Alias: Umbraco.DateTime
UI Alias: Umb.PropertyEditorUi.DatePicker
Returns: Date
Displays a calendar UI for selecting dates which are saved as a DateTime value.
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.
@(Model.Content.GetPropertyValue<DateTime>("datePicker").ToString("dd MM yyyy"))
{% hint style="warning" %} See Common pitfalls for more information about why the dynamic approach is obsolete. {% endhint %}
@{
@CurrentPage.datePicker.ToString("dd-MM-yyyy")
}