Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/NcDateTimePicker/NcDateTimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ function cancelSelection() {
:aria-labels
:auto-apply="!confirm"
class="vue-date-time-picker"
:class="{ 'vue-date-time-picker--clearable': clearable }"
:cancel-text="t('Cancel')"
:clearable
:day-names
Expand Down Expand Up @@ -671,7 +672,7 @@ function cancelSelection() {
--dp-cell-padding: 5px;
--dp-common-padding: 10px;
--dp-input-icon-padding: var(--default-clickable-area);
--dp-input-padding: 6px 30px 6px 12px;
--dp-input-padding: 6px 12px;
--dp-menu-min-width: 260px;
--dp-action-buttons-padding: 1px 6px;
--dp-row-margin: 5px 0;
Expand All @@ -692,6 +693,10 @@ function cancelSelection() {
@include meta.load-css('@vuepic/vue-datepicker/dist/main.css');
}

.vue-date-time-picker--clearable :deep(.dp__input) {
padding-inline-end: var(--default-clickable-area);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be not just update the --dp-input-padding variable here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like this?

Suggested change
padding-inline-end: var(--default-clickable-area);
--dp-input-padding: 6px var(--default-clickable-area) 6px 12px;

This should also work, I don't have a preference here, honestly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but also if 6px/12px will change, we have to update in in both places. -inline-end is limiting changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning was just that the variables are public API but the class names could break someday.

}

.vue-date-time-picker__timezone {
min-width: unset;
width: 100%;
Expand Down
Loading