Skip to content

Commit

Permalink
fix(FE): 카드 등록시 날짜 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
SUMMERLOVE7 committed Feb 23, 2023
1 parent 955ca59 commit 3eec84f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/pages/PostPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,16 @@ const uploadImg = (file) => {
};

const sendCardData = async () => {
const date = $.qs('#date-input').value;
let [year, month, day] = date.split('-');
month.length === 1 && (month = `0${month}`);
day.length === 1 && (day = `0${day}`);

const cardData = {
itemName: gifticonData.itemName,
brandName: gifticonData.brandName,
barcode: gifticonData.barcode,
expiresAtInString: $.qs('#date-input').value,
expiresAtInString: `${year}-${month}-${day}`,
price: '5000',
};

Expand Down

0 comments on commit 3eec84f

Please sign in to comment.