Date
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.
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

MVC View Example - displays a datetime
With Models Builder
Without Models Builder
Add values programmatically
See the example below to see how a value can be added or changed programmatically. To update a value of a property editor you need the Content Service.
Although the use of a GUID is preferable, you can also use the numeric ID to get the page:
If Models Builder is enabled you can get the alias of the desired property without using a magic string:
Last updated
Was this helpful?