mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Merge pull request #2077 from ErisDS/date-fixes
Post settings published_at date improvements & fixes
This commit is contained in:
commit
e42c94bec4
2 changed files with 838 additions and 185 deletions
|
@ -5,8 +5,8 @@
|
|||
(function () {
|
||||
"use strict";
|
||||
|
||||
var parseDateFormats = ['DD MMM YY HH:mm', 'DD MMM YYYY HH:mm', 'DD/MM/YY HH:mm', 'DD/MM/YYYY HH:mm',
|
||||
'DD-MM-YY HH:mm', 'DD-MM-YYYY HH:mm'],
|
||||
var parseDateFormats = ["DD MMM YY HH:mm", "DD MMM YYYY HH:mm", "DD/MM/YY HH:mm", "DD/MM/YYYY HH:mm",
|
||||
"DD-MM-YY HH:mm", "DD-MM-YYYY HH:mm", "YYYY-MM-DD HH:mm"],
|
||||
displayDateFormat = 'DD MMM YY @ HH:mm';
|
||||
|
||||
Ghost.View.PostSettings = Ghost.View.extend({
|
||||
|
@ -158,7 +158,8 @@
|
|||
e.preventDefault();
|
||||
var self = this,
|
||||
errMessage = '',
|
||||
pubDate = moment(self.model.get('published_at')).format(displayDateFormat),
|
||||
pubDate = self.model.get('published_at') ? moment(self.model.get('published_at'))
|
||||
.format(displayDateFormat) : '',
|
||||
pubDateEl = e.currentTarget,
|
||||
newPubDate = pubDateEl.value,
|
||||
pubDateMoment,
|
||||
|
|
1016
core/shared/vendor/moment.js
vendored
1016
core/shared/vendor/moment.js
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue