Convert all date to DD-MM-YYYY accross all component.
This commit is contained in:
parent
b479325816
commit
50d5c69db1
@ -171,7 +171,7 @@ const AttendanceLog = ({ handleModalData, projectId, showOnlyCheckout }) => {
|
||||
acc.push(
|
||||
<tr key={`header-${currentDate}`} className="table-row-header">
|
||||
<td colSpan={6} className="text-start">
|
||||
<strong>{moment(currentDate).format("YYYY-MM-DD")}</strong>
|
||||
<strong>{moment(currentDate).format("DD-MM-YYYY")}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ const DateRangePicker = ({ onRangeChange, DateDifference = 7, defaultStartDate =
|
||||
|
||||
const fp = flatpickr(inputRef.current, {
|
||||
mode: "range",
|
||||
dateFormat: "Y-m-d",
|
||||
dateFormat: "d-m-Y",
|
||||
defaultDate: [fifteenDaysAgo, today],
|
||||
static: true,
|
||||
clickOpens: true,
|
||||
|
||||
@ -6,7 +6,7 @@ import { useTaskList } from "../../hooks/useTasks";
|
||||
import { useProjects } from "../../hooks/useProjects";
|
||||
import { setProjectId } from "../../slices/localVariablesSlice";
|
||||
import { useProfile } from "../../hooks/useProfile";
|
||||
import { formatDate } from "../../utils/dateUtils";
|
||||
// import { formatDate } from "../../utils/dateUtils"; // Removed this import
|
||||
import GlobalModel from "../../components/common/GlobalModel";
|
||||
import AssignRoleModel from "../../components/Project/AssignRole";
|
||||
import { ReportTask } from "../../components/Activities/ReportTask";
|
||||
@ -14,6 +14,7 @@ import ReportTaskComments from "../../components/Activities/ReportTaskComments";
|
||||
import DateRangePicker from "../../components/common/DateRangePicker";
|
||||
import DatePicker from "../../components/common/DatePicker";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import moment from "moment";
|
||||
|
||||
const DailyTask = () => {
|
||||
const [searchParams] = useSearchParams();
|
||||
@ -141,6 +142,7 @@ const DailyTask = () => {
|
||||
<DateRangePicker
|
||||
onRangeChange={setDateRange}
|
||||
DateDifference="6"
|
||||
dateFormat="DD-MM-YYYY"
|
||||
/>
|
||||
</div>
|
||||
<div className="col-sm-3 col-6 text-end mb-1">
|
||||
@ -199,7 +201,7 @@ const DailyTask = () => {
|
||||
<React.Fragment key={i}>
|
||||
<tr className="table-row-header">
|
||||
<td colSpan={7} className="text-start">
|
||||
<strong>{date}</strong>
|
||||
<strong>{moment(date).format("DD-MM-YYYY")}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
{TaskLists.filter((task) =>
|
||||
@ -246,7 +248,7 @@ const DailyTask = () => {
|
||||
task.workItem.completedWork}
|
||||
</td>
|
||||
<td>{task.completedTask}</td>
|
||||
<td>{formatDate(task.assignmentDate)}</td>
|
||||
<td>{moment(task.assignmentDate).format("DD-MM-YYYY")}</td>
|
||||
<td className="text-center">
|
||||
<div
|
||||
key={refIndex}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user