2022-03-03 00:53:10 +03:00
|
|
|
<div class="gh-date-time-picker" data-test-component="gh-date-time-picker">
|
2020-01-15 16:53:51 +03:00
|
|
|
<PowerDatepicker
|
|
|
|
@selected={{this._date}}
|
|
|
|
@center={{this._date}}
|
2022-02-01 12:34:03 +03:00
|
|
|
@onSelect={{action "setDateInternal" value="date"}}
|
2022-04-27 20:20:46 +03:00
|
|
|
@renderInPlace={{this.renderInPlaceWithFallback}}
|
2020-01-15 16:53:51 +03:00
|
|
|
@disabled={{this.disabled}} as |dp|
|
|
|
|
>
|
2022-03-03 00:53:10 +03:00
|
|
|
<dp.Trigger @tabindex="-1" data-test-date-time-picker-datepicker>
|
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}}
|
2022-02-01 12:34:03 +03:00
|
|
|
{{on "change" this.updateTimeValue}}
|
|
|
|
{{on "blur" (fn this.setTimeInternal 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
|
|
|
|
>
|
2022-03-03 00:53:10 +03:00
|
|
|
<small class="gh-date-time-picker-timezone" data-test-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}}
|