mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
🐛 Fixed schedule post date picker sometimes not allowing "today" to be selected
no issue - with large site timezone UTC offsets it could happen that "today" in the site timezone is not selectable in the date picker when scheduling posts - the problem occurred because we were passing a minimum date to the date picker in UTC which was then converted to a local date using just the "YYYY-MM-DD" data but that would not always be correct because the UTC date could be "tomorrow" compared to the site timezone. Passing in the minimum date in the site timezone rather than UTC ensures the minimum date always matches "today" in the site timezone
This commit is contained in:
parent
100dea6d98
commit
f03041929f
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
@time={{moment-format (moment-site-tz @publishOptions.scheduledAtUTC) "HH:mm"}}
|
||||
@setDate={{this.setDate}}
|
||||
@setTime={{this.setTime}}
|
||||
@minDate={{@publishOptions.minScheduledAt}}
|
||||
@minDate={{moment-site-tz @publishOptions.minScheduledAt}}
|
||||
@isActive={{@publishOptions.isScheduled}}
|
||||
@renderInPlace={{false}}
|
||||
/>
|
||||
|
|
|
@ -119,7 +119,7 @@ export default class GhDateTimePicker extends Component {
|
|||
}
|
||||
this.set('_previousTime', this._time);
|
||||
|
||||
// unless min/max date is at midnight moment will diable that day
|
||||
// unless min/max date is at midnight moment will disable that day
|
||||
if (minDate === 'now') {
|
||||
this.set('_minDate', moment(moment().format(DATE_FORMAT)));
|
||||
} else if (!isBlank(minDate)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue