- 일반회원에 대한 예매 정보가 없었기 때문에 일반회원 예매일정을 추가
const gamelist = []; // game Date형 배열 const gamelist_gold = []; // game7일전 Date형 배열 const gamelist_silver = []; // game5일전 Date형 배열 const gamelist_normal = []; // game3일전 Date형 배열 // 년도 포함한 경기 5일전 날짜 배열(2023-10-13) const modifiedgameMinusDates = start_modifiedGameDates.map(date => { const [yearStr, monthStr, dayStr] = date.split('-'); const year = parseInt(yearStr, 10); //parseInt(string, radix(진수)) 문자열 분석하고 정수로 변환 const month = parseInt(monthStr, 10); const day = parseInt(dayStr, 10); for(let i = 0; i < start_modifiedGameDates.length; i++){ const [yearStr, monthStr, dayStr] = start_modifiedGameDates[i].split('-'); const year = parseInt(yearStr, 10); const month = parseInt(monthStr, 10); const day = parseInt(dayStr, 10); const gamelistDate = new Date(year, month - 1, day); gamelist.push(gamelistDate); const game1MinusDate = new Date(gamelistDate.getFullYear(), gamelistDate.getMonth(), (gamelistDate.getDate()-1)); const formattedDate1 = game1MinusDate.toISOString().split('T')[0]; //날짜 개체를 ISO 문자열로 변환한 다음 "YYYY-MM-DD 형식의 날짜 부분을 추출 gamelist_normal.push(formattedDate1); const game3MinusDate = new Date(gamelistDate.getFullYear(), gamelistDate.getMonth(), (gamelistDate.getDate()-3)); const formattedDate3 = game3MinusDate.toISOString().split('T')[0]; //날짜 개체를 ISO 문자열로 변환한 다음 "YYYY-MM-DD 형식의 날짜 부분을 추출 gamelist_silver.push(formattedDate3); const game5MinusDate = new Date(gamelistDate.getFullYear(), gamelistDate.getMonth(), (gamelistDate.getDate()-5)); const formattedDate5 = game5MinusDate.toISOString().split('T')[0]; //날짜 개체를 ISO 문자열로 변환한 다음 "YYYY-MM-DD 형식의 날짜 부분을 추출 gamelist_gold.push(formattedDate5); } });
- 달력 헤더 와 body 사이에 등급을 표시해주고 싶은데 createElement나 직접 태그 추가하는 방식들이 안된다ㅠ

- 경기 일정 클릭했을 때 회원정보도 알려주기 위해 일정 그릴때 comment를 남겨주고 그 comment를 불러서 넣어주는 방식으로 구현했다!
const member = { id: `event${i}`, title: start_modifiedGameDates[i].substring(5,start_modifiedGameDates[i].lengthS) + ' 경기 예매', start: gamelist_normal[i], end: end_modifiedGameDates[i], allDay: true, backgroundColor: "#d4d4d4", textColor: 'black', extendedProps: { comment: '일반회원' } }; const memberLevel = eventInfo.event.extendedProps.comment; document.getElementById('memberlevel').textContent = memberLevel;
'프로젝트 > My' 카테고리의 다른 글
MY PROJECT(7)Trouble Shooting - 경기일정에 따른 일정표시 (0) | 2024.05.02 |
---|---|
MY PROJECT(6) - 질의응답 비밀번호 (0) | 2024.05.02 |
MY PROJECT(4) - genfile 경로 지정 (0) | 2024.04.25 |
MY PROJECT(3) - 중간과정 (0) | 2024.04.25 |
MY PROJECT(2) - 구성 (0) | 2024.04.21 |