From 5fa6c0fa78435abf65732e544ff2ce8c9c445333 Mon Sep 17 00:00:00 2001 From: WingedToaster Date: Tue, 28 Apr 2015 01:27:18 -0500 Subject: [PATCH] Change default formatString for Types.Datetime The default display for the Types.Datetime field is only a date, as the control is technically for a date and time I kindly suggest that it should display both the date and the time. I found this issue when trying to display a create and modify date by using the nodes option on the field. --- fields/types/datetime/DatetimeType.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fields/types/datetime/DatetimeType.js b/fields/types/datetime/DatetimeType.js index 17ca1dfb6b..f9366a1927 100644 --- a/fields/types/datetime/DatetimeType.js +++ b/fields/types/datetime/DatetimeType.js @@ -22,7 +22,7 @@ function datetime(list, path, options) { this._properties = ['formatString']; this.typeDescription = 'date and time'; - this.formatString = (options.format === false) ? false : (options.format || 'Do MMM YYYY'); + this.formatString = (options.format === false) ? false : (options.format || 'YYYY-MM-DD h:m:s a'); if (this.formatString && 'string' !== typeof this.formatString) { throw new Error('FieldType.DateTime: options.format must be a string.');