Replace jalaali-react-date-picker with custom MUI-based Jalali date picker - fixes all 10 security vulnerabilities
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { DatePicker } from "jalaali-react-date-picker";
|
||||
import JalaliDatePicker from "@/components/common/JalaliDatePicker";
|
||||
import { nextIconData, prevIconData } from "./dataIcon";
|
||||
import LoadingDate from "../LoadingDate";
|
||||
import Image from "next/image";
|
||||
@@ -16,10 +16,9 @@ function FirstDatePicker({
|
||||
}) {
|
||||
return (
|
||||
<div className="w-full first md:w-1/2 lg:w-full xl:w-1/2 relative flex justify-center">
|
||||
<DatePicker
|
||||
<JalaliDatePicker
|
||||
value={startDate}
|
||||
className={`w-full ${loading ? "opacity-0" : "opacity-100"}`}
|
||||
timePicker={false}
|
||||
nextIcon={
|
||||
<Image {...nextIconData} ref={nextIconDatePickerF} id="nextIconF" />
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { DatePicker } from "jalaali-react-date-picker";
|
||||
import JalaliDatePicker from "@/components/common/JalaliDatePicker";
|
||||
import { nextIconData, prevIconData } from "./dataIcon";
|
||||
import LoadingDate from "../LoadingDate";
|
||||
import Image from "next/image";
|
||||
@@ -16,9 +16,8 @@ function SecondDatePicker({
|
||||
return (
|
||||
<div className="w-1/2 second hidden md:flex lg:hidden xl:flex">
|
||||
<div className="w-full relative flex justify-center">
|
||||
<DatePicker
|
||||
<JalaliDatePicker
|
||||
value={endDate}
|
||||
timePicker={false}
|
||||
className={`w-full ${loading ? "opacity-0" : "opacity-100"}`}
|
||||
nextIcon={
|
||||
<Image
|
||||
|
||||
Reference in New Issue
Block a user