Skip to content

Commit

Permalink
feat(datepicker): add today indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Jul 29, 2024
1 parent 877cad2 commit 90b7bea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '../../../../../style/input';
@import '~vanillajs-datepicker/dist/css/datepicker.min.css';

$ods-datepicker-item-size: 32px;
$ods-datepicker-item-size: 36px;
$ods-datepicker-padding: 6px;
$ods-datepicker-clearable-button-size: input.$ods-input-actions-button-width;

Expand Down Expand Up @@ -202,6 +202,24 @@ $ods-datepicker-clearable-button-size: input.$ods-input-actions-button-width;
opacity: .5;
}
}

&.today {
position: relative;

&::after {
position: absolute;
bottom: 3px;
border-radius: 50%;
background-color: var(--ods-color-primary-500);
width: 4px;
height: 4px;
content: '';
}

&:not(.selected) {
background-color: inherit;
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class OdsDatepicker {
prevArrow: `<ods-icon name="${ODS_ICON_NAME.chevronLeft}"></ods-icon>`,
showOnClick: true,
showOnFocus: true,
todayHighlight: true,
updateOnBlur: true,
});
// Apply initial DOM changes on the picker
Expand Down

0 comments on commit 90b7bea

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy