Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(orders): fixs date comparison when using different locale #10033

Open
wants to merge 1 commit into
base: v1.x
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { addHours, atMidnight, dateToUnixTimestamp } from "../../../utils/time"

import clsx from "clsx"
import moment from "moment"
import { useTranslation } from "react-i18next"
import { DateFilters } from "../../../utils/filters"
import { CalendarComponent } from "../../atoms/date-picker/date-picker"
import Spinner from "../../atoms/spinner"
Expand All @@ -31,6 +32,7 @@ const FilterDropdownItem = ({
onShowNext,
onShowPrev,
}) => {
const { t } = useTranslation()
const prefilled = useMemo(() => {
try {
const toReturn = filters.reduce((acc, f) => {
Expand Down Expand Up @@ -148,7 +150,7 @@ const FilterDropdownItem = ({
<div className="flex items-center justify-center py-1">
<Spinner size={"large"} variant={"secondary"} />
</div>
) : filterTitle === "Date" ? (
) : filterTitle === t("order-filter-dropdown-date", "Date") ? (
<DateFilter
options={options}
open={open}
Expand Down