Skip to content

Commit

Permalink
Change default formatString for Types.Datetime
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WingedToaster committed Apr 28, 2015
1 parent 3dcf000 commit 5fa6c0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fields/types/datetime/DatetimeType.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit 5fa6c0f

Please sign in to comment.