mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Added ability to set classes for parts of <GhDateTimePicker>
no issue - adds additional class arguments: - `@datePickerTriggerClass` - `@datePickerClass` - `@timeInputClass`
This commit is contained in:
parent
7356933d12
commit
fc25bf5713
2 changed files with 4 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
</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}}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@renderInPlace={{this.renderInPlaceWithFallback}}
|
||||
@disabled={{this.disabled}} as |dp|
|
||||
>
|
||||
<dp.Trigger @tabindex="-1" data-test-date-time-picker-datepicker>
|
||||
<dp.Trigger class={{@datePickerTriggerClass}} @tabindex="-1" data-test-date-time-picker-datepicker>
|
||||
<div class="gh-date-time-picker-date {{if this.dateError "error"}}">
|
||||
<input type="text"
|
||||
placeholder={{this.dateFormat}}
|
||||
|
@ -19,13 +19,13 @@
|
|||
{{svg-jar "calendar"}}
|
||||
</div>
|
||||
</dp.Trigger>
|
||||
<dp.Content class="dropdown-menu">
|
||||
<dp.Content class="dropdown-menu {{@datePickerClass}}">
|
||||
<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"}}">
|
||||
<div class="gh-date-time-picker-time {{if this.hasError "error"}} {{@timeInputClass}}">
|
||||
<input
|
||||
type="text"
|
||||
value={{this._time}}
|
||||
|
|
Loading…
Add table
Reference in a new issue