2017-04-11 16:39:45 +03:00
|
|
|
<div class="gh-date-time-picker">
|
2020-01-15 16:53:51 +03:00
|
|
|
<PowerDatepicker
|
|
|
|
@selected={{this._date}}
|
|
|
|
@center={{this._date}}
|
|
|
|
@onSelect={{action "setDate" value="date"}}
|
|
|
|
@renderInPlace={{true}}
|
|
|
|
@disabled={{this.disabled}} as |dp|
|
|
|
|
>
|
2021-05-12 17:47:37 +03:00
|
|
|
<dp.Trigger @tabindex="-1" data-test-date-time-picker-datepicker={{true}}>
|
2019-12-13 17:20:29 +03:00
|
|
|
<div class="gh-date-time-picker-date {{if this.dateError "error"}}">
|
2020-01-10 17:25:59 +03:00
|
|
|
<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>
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "calendar"}}
|
2017-04-11 16:39:45 +03:00
|
|
|
</div>
|
2020-01-15 16:53:51 +03:00
|
|
|
</dp.Trigger>
|
|
|
|
<dp.Content class="dropdown-menu">
|
|
|
|
<dp.Nav />
|
|
|
|
<dp.Days @minDate={{this._minDate}} @maxDate={{this._maxDate}} @weekdayFormat="min" />
|
|
|
|
</dp.Content>
|
|
|
|
</PowerDatepicker>
|
2017-04-11 16:39:45 +03:00
|
|
|
|
2019-12-13 17:20:29 +03:00
|
|
|
<div class="gh-date-time-picker-time {{if this.hasError "error"}}">
|
2018-03-07 13:58:34 +03:00
|
|
|
<input
|
|
|
|
type="text"
|
2019-12-13 17:20:29 +03:00
|
|
|
value={{this._time}}
|
|
|
|
disabled={{this.disabled}}
|
|
|
|
oninput={{action (mut this._time) value="target.value"}}
|
|
|
|
onblur={{action "setTime" this._time}}
|
2020-01-10 17:25:59 +03:00
|
|
|
{{did-insert this.registerTimeInput}}
|
2018-03-07 13:58:34 +03:00
|
|
|
data-test-date-time-picker-time-input
|
|
|
|
>
|
2019-12-13 17:20:29 +03:00
|
|
|
<small class="gh-date-time-picker-timezone">({{this.timezone}})</small>
|
2017-04-11 16:39:45 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.hasError}}
|
|
|
|
<div class="gh-date-time-picker-error" data-test-date-time-picker-error>{{this.dateError}}{{this.timeError}}</div>
|
2017-04-11 16:39:45 +03:00
|
|
|
{{/if}}
|