Skip to content

Commit

Permalink
Use current day's date & minor changes (#1584)
Browse files Browse the repository at this point in the history
use current date & minor changes

Co-authored-by: “Apoorv <“[email protected]”>
Co-authored-by: Prasanth Chaduvula <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2023
1 parent 1a2d7de commit af3cbce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const MarkInvoiceAsPaidModal = ({
fetchInvoice,
}) => {
const { isDesktop } = useUserContext();
const [transactionDate, setTransactionDate] = useState<any>(null);
const [transactionDate, setTransactionDate] = useState<any>(dayjs());
const [transactionType, setTransactionType] = useState<any>(null);
const [note, setNote] = useState<any>(null);
const [showDatePicker, setShowDatePicker] = useState<any>(false);
Expand Down Expand Up @@ -120,16 +120,17 @@ const MarkInvoiceAsPaidModal = ({
}
>
<CustomInputText
disabled
readOnly
id="transactionDate"
inputBoxClassName="cursor-pointer"
label="Transaction Date"
name="transactionDate"
type="text"
value={transactionDate && dayjs(transactionDate).format(dateFormat)}
onChange={() => {}} //eslint-disable-line
/>
<CalendarIcon
className="absolute top-0 bottom-0 right-1 mx-2 my-3 "
className="absolute top-0 bottom-0 right-1 mx-2 my-3 cursor-pointer "
color="#5B34EA"
size={20}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const PaymentEntryForm = ({
const { isDesktop } = useUserContext();

const [invoice, setInvoice] = useState<any>(null);
const [transactionDate, setTransactionDate] = useState<any>(null);
const [transactionDate, setTransactionDate] = useState<any>(dayjs());
const [transactionType, setTransactionType] = useState<any>(null);
const [amount, setAmount] = useState<any>(null);
const [note, setNote] = useState<any>(null);
Expand Down Expand Up @@ -249,16 +249,17 @@ const PaymentEntryForm = ({
}
>
<CustomInputText
disabled
readOnly
id="transactionDate"
inputBoxClassName="cursor-pointer"
label="Transaction Date"
name="transactionDate"
type="text"
value={transactionDate && dayjs(transactionDate).format(dateFormat)}
onChange={() => {}} //eslint-disable-line
/>
<CalendarIcon
className="absolute top-0 bottom-0 right-1 mx-2 my-3 "
className="absolute top-0 bottom-0 right-1 mx-2 my-3 cursor-pointer"
color="#5B34EA"
size={20}
/>
Expand Down

0 comments on commit af3cbce

Please sign in to comment.