set icon for timepicker field and set deafult step to 0
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useRef, useState } from "react";
|
||||
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
||||
import { LocalizationProvider, TimePicker } from "@mui/x-date-pickers";
|
||||
import { handleTwoLength } from "@/helper";
|
||||
import ClockP from "@/components/icons/ClockP";
|
||||
|
||||
function TimePickerField({ dataChange, isVacation, disable, timeStart, data }) {
|
||||
const input = useRef();
|
||||
@@ -88,15 +89,12 @@ function TimePickerField({ dataChange, isVacation, disable, timeStart, data }) {
|
||||
{value}
|
||||
</p>
|
||||
</LocalizationProvider>
|
||||
{/* <button
|
||||
onClick={() => {
|
||||
console.log(input);
|
||||
|
||||
input.current.open = true;
|
||||
}}
|
||||
<div
|
||||
className="absolute left-[12px] top-1/2 -translate-y-1/2 cursor-pointer"
|
||||
onClick={openTimePicker}
|
||||
>
|
||||
test
|
||||
</button> */}
|
||||
<ClockP />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import GeneralInformation from "./listMenu/generalInformation";
|
||||
import Step from "./Step";
|
||||
|
||||
function AddDoctorPage() {
|
||||
const [value, setValue] = useState(1);
|
||||
const [value, setValue] = useState(0);
|
||||
const [data, setData] = useState({
|
||||
general: {
|
||||
name: { value: "", placeholder: "احسان احمدی", isEdit: true },
|
||||
|
||||
@@ -74,7 +74,7 @@ function Form({
|
||||
disable={value === 1}
|
||||
setData={setData}
|
||||
timeStart={true}
|
||||
data={data}
|
||||
data={data[parent]}
|
||||
/>
|
||||
</ContentText>
|
||||
<ContentText text="زمان پایان">
|
||||
@@ -84,7 +84,7 @@ function Form({
|
||||
disable={value === 1}
|
||||
setData={setData}
|
||||
timeStart={false}
|
||||
data={data}
|
||||
data={data[parent]}
|
||||
/>
|
||||
</ContentText>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user