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

Use current day's date & minor changes #1584

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
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 @@ -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
Loading