mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
date picker fix
This commit is contained in:
@@ -77,6 +77,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: var(--rdp-nav-height);
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.amharic-daypicker .rdp-button_previous,
|
||||
@@ -88,6 +90,9 @@
|
||||
height: var(--rdp-nav_button-height);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.amharic-daypicker .rdp-dropdowns {
|
||||
@@ -154,6 +159,7 @@
|
||||
.amharic-daypicker .rdp-month_caption {
|
||||
font-size: inherit;
|
||||
font-weight: 600;
|
||||
margin-inline-end: calc(var(--rdp-nav_button-width) * 2 + 0.5rem);
|
||||
}
|
||||
|
||||
/* Day cells are already circular (--rdp-day_button-border-radius: 100%);
|
||||
|
||||
@@ -154,6 +154,7 @@ export function toGregorianDateLabel(date: Date | string): string {
|
||||
return d.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' });
|
||||
}
|
||||
|
||||
const YEAR_DROPDOWN_START = new Date(new Date().getFullYear() - 100, 0, 1);
|
||||
const YEAR_DROPDOWN_END = new Date(new Date().getFullYear() + 50, 11, 31);
|
||||
|
||||
export interface AmharicDatePickerProps {
|
||||
@@ -291,6 +292,7 @@ export function AmharicDatePicker({
|
||||
mode="single"
|
||||
selected={selected ?? undefined}
|
||||
defaultMonth={selected ?? undefined}
|
||||
startMonth={YEAR_DROPDOWN_START}
|
||||
endMonth={YEAR_DROPDOWN_END}
|
||||
numerals="latn"
|
||||
captionLayout="dropdown"
|
||||
@@ -306,6 +308,7 @@ export function AmharicDatePicker({
|
||||
mode="single"
|
||||
selected={selected ?? undefined}
|
||||
defaultMonth={selected ?? undefined}
|
||||
startMonth={YEAR_DROPDOWN_START}
|
||||
endMonth={YEAR_DROPDOWN_END}
|
||||
captionLayout="dropdown"
|
||||
onSelect={(date: Date | undefined) => {
|
||||
|
||||
Reference in New Issue
Block a user