This commit is contained in:
rizky 2024-08-20 02:49:12 -07:00
parent b8064504d6
commit fcb73aaf43
3 changed files with 8 additions and 4 deletions

View File

@ -365,7 +365,7 @@ const Days: React.FC<Props> = ({
type="button"
key={index}
disabled={isDateDisabled(item, "current")}
className={`${buttonClass(item, "current")}`}
className={cx(`${buttonClass(item, "current")}`, item === 1 && "highlight")}
onClick={() => handleClickDay(item, "current")}
onMouseOver={() => {
hoverDay(item, "current");

View File

@ -116,7 +116,7 @@ const Calendar: React.FC<Props> = ({
setShowMonths(!showMonths);
} else {
hideDatepicker();
clickDay(1,month, date.year() );
clickDay(1, month, date.year());
}
}, 250);
},
@ -130,7 +130,7 @@ const Calendar: React.FC<Props> = ({
setShowYears(!showYears);
if (mode === "monthly") {
setShowMonths(true);
clickDay(1,date.month() + 1, year );
clickDay(1, date.month() + 1, year);
}
}, 250);
},
@ -339,7 +339,6 @@ const Calendar: React.FC<Props> = ({
</div>
)}
</div>
<div className={cx("c-mt-0.5 c-min-h-[285px]")}>
{showMonths && (
<Months

View File

@ -7,6 +7,9 @@ export const Flow: FC<{
props?: any;
active?: string | (() => string);
}> = ({ PassProp, children, flow, props, active }) => {
const active_str = typeof active === "function" ? active() : active;
const active_idx = flow.findIndex(e=> e.text === active_str)
return (
<div {...props} className={cx(props.className, "c-flex-row")}>
{flow.map((item, idx) => {
@ -17,7 +20,9 @@ export const Flow: FC<{
idx={idx}
key={idx}
active={active}
active_idx={active_idx}
is_last={idx === flow.length - 1}
is_first={idx === 0}
>
{children}
</PassProp>