Skip to content

Commit

Permalink
after cr
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Feb 15, 2023
1 parent 41247b5 commit 90cb7e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/bundle/Resources/public/js/scripts/core/date.time.picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
this.fieldWrapper = this.container.querySelector('.ibexa-date-time-picker');
this.inputField = this.fieldWrapper.querySelector('.ibexa-date-time-picker__input');
this.actionsWrapper = this.fieldWrapper.querySelector('.ibexa-input-text-wrapper__actions');
this.calendarButton = this.actionsWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--calendar');
this.calendarBtn = this.actionsWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--calendar');
this.clearBtn = this.fieldWrapper.querySelector('.ibexa-input-text-wrapper__action-btn--clear');
this.customOnChange = config.onChange;

Expand Down Expand Up @@ -99,18 +99,15 @@
this.flatpickrInstance = flatpickr(this.inputField, this.flatpickrConfig);

this.inputField.addEventListener('input', this.onInput, false);
this.calendarButton.addEventListener(
this.flatpickrInstance.minuteElement.addEventListener('keyup', this.onKeyUp.bind(this, true), false);
this.flatpickrInstance.hourElement.addEventListener('keyup', this.onKeyUp.bind(this, false), false);
this.calendarBtn.addEventListener(
'click',
() => {
this.flatpickrInstance.open();
},
false,
);

if (this.flatpickrInstance.config.enableTime) {
this.flatpickrInstance.minuteElement.addEventListener('keyup', this.onKeyUp.bind(this, true), false);
this.flatpickrInstance.hourElement.addEventListener('keyup', this.onKeyUp.bind(this, false), false);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
{% endblock %}
{% block actions %}
{{ parent() }}
<button type="button" class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--calendar">
<button
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text ibexa-input-text-wrapper__action-btn ibexa-input-text-wrapper__action-btn--calendar"
>
<svg class="ibexa-icon ibexa-icon--small">
<use xlink:href="{{ ibexa_icon_path('date') }}"></use>
</svg>
Expand Down

0 comments on commit 90cb7e2

Please sign in to comment.