mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
4c9eeddd79
no issue - catch `undefined` error when saving posts in editor which is thrown by our validation system and handled elsewhere - bumped `ember-power-select` and switched `ember-power-datepicker` to a github ref so dependency-update fixes are included (version not released yet, see https://github.com/cibernox/ember-power-datepicker/issues/61) - added a resolution for `ember-basic-dropdown@3.0.16`, with the latest `3.0.17` nothing is shown for the publish/post-settings menus for the date picker dropdown
44 lines
1.7 KiB
Handlebars
44 lines
1.7 KiB
Handlebars
<div class="gh-date-time-picker">
|
|
<PowerDatepicker
|
|
@selected={{this._date}}
|
|
@center={{this._date}}
|
|
@onSelect={{action "setDate" value="date"}}
|
|
@renderInPlace={{true}}
|
|
@disabled={{this.disabled}} as |dp|
|
|
>
|
|
<dp.Trigger @tabindex="-1" data-test-date-time-picker-datepicker={{true}}>
|
|
<div class="gh-date-time-picker-date {{if this.dateError "error"}}">
|
|
<input type="text"
|
|
placeholder={{this.dateFormat}}
|
|
value={{readonly this.dateValue}}
|
|
disabled={{this.disabled}}
|
|
{{on "input" (fn this.onDateInput dp)}}
|
|
{{on "blur" this.onDateBlur}}
|
|
{{on "keydown" (fn this.onDateKeydown dp)}}
|
|
data-test-date-time-picker-date-input>
|
|
{{svg-jar "calendar"}}
|
|
</div>
|
|
</dp.Trigger>
|
|
<dp.Content class="dropdown-menu">
|
|
<dp.Nav />
|
|
<dp.Days @minDate={{this._minDate}} @maxDate={{this._maxDate}} @weekdayFormat="min" />
|
|
</dp.Content>
|
|
</PowerDatepicker>
|
|
|
|
<div class="gh-date-time-picker-time {{if this.hasError "error"}}">
|
|
<input
|
|
type="text"
|
|
value={{this._time}}
|
|
disabled={{this.disabled}}
|
|
oninput={{action (mut this._time) value="target.value"}}
|
|
onblur={{action "setTime" this._time}}
|
|
{{did-insert this.registerTimeInput}}
|
|
data-test-date-time-picker-time-input
|
|
>
|
|
<small class="gh-date-time-picker-timezone">({{this.timezone}})</small>
|
|
</div>
|
|
</div>
|
|
{{#if this.hasError}}
|
|
<div class="gh-date-time-picker-error" data-test-date-time-picker-error>{{this.dateError}}{{this.timeError}}</div>
|
|
{{/if}}
|