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
|
2022-10-07 13:20:06 +03:00
|
|
|
@selected={{readonly this.localDateValue}}
|
|
|
|
@center={{readonly this.localDateValue}}
|
|
|
|
@onSelect={{action "setLocalDate" 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-05-09 12:31:14 +03:00
|
|
|
<dp.Trigger class={{@datePickerTriggerClass}} @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>
|
2022-05-09 12:31:14 +03:00
|
|
|
<dp.Content class="dropdown-menu {{@datePickerClass}}">
|
2020-01-15 16:53:51 +03:00
|
|
|
<dp.Nav />
|
|
|
|
<dp.Days @minDate={{this._minDate}} @maxDate={{this._maxDate}} @weekdayFormat="min" />
|
|
|
|
</dp.Content>
|
|
|
|
</PowerDatepicker>
|
2017-04-11 16:39:45 +03:00
|
|
|
|
2022-05-09 12:31:14 +03:00
|
|
|
<div class="gh-date-time-picker-time {{if this.hasError "error"}} {{@timeInputClass}}">
|
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-05-06 19:10:08 +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>
|
2024-05-16 17:59:07 +03:00
|
|
|
{{#if this.hasError}}
|
|
|
|
<div class="gh-date-time-picker-error" data-test-date-time-picker-error>{{this.dateError}}{{this.timeError}}</div>
|
|
|
|
{{/if}}
|