mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
f03041929f
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
25 lines
1.2 KiB
Handlebars
25 lines
1.2 KiB
Handlebars
{{!-- template-lint-disable no-invalid-interactive --}}
|
|
<fieldset>
|
|
<div class="gh-publish-schedule">
|
|
<div class="gh-radio {{unless @publishOptions.isScheduled "active"}}" {{on "click" (fn @publishOptions.toggleScheduled false)}}>
|
|
<div class="gh-radio-button" data-test-radio="publish-now"></div>
|
|
<label>Set it live now</label>
|
|
</div>
|
|
<div class="gh-radio {{if @publishOptions.isScheduled "active"}}" {{on "click" (fn @publishOptions.toggleScheduled true)}}>
|
|
<div class="gh-radio-button" data-test-radio="schedule"></div>
|
|
<label>Schedule for later</label>
|
|
</div>
|
|
</div>
|
|
{{#if @publishOptions.isScheduled}}
|
|
<GhDateTimePicker
|
|
@datePickerClass="publish-flow-datepicker"
|
|
@date={{moment-format (moment-site-tz @publishOptions.scheduledAtUTC) "YYYY-MM-DD"}}
|
|
@time={{moment-format (moment-site-tz @publishOptions.scheduledAtUTC) "HH:mm"}}
|
|
@setDate={{this.setDate}}
|
|
@setTime={{this.setTime}}
|
|
@minDate={{moment-site-tz @publishOptions.minScheduledAt}}
|
|
@isActive={{@publishOptions.isScheduled}}
|
|
@renderInPlace={{false}}
|
|
/>
|
|
{{/if}}
|
|
</fieldset> |