Skip to content

Commit

Permalink
Merge pull request #92 from zdinidz/fix-style-on-selected-range
Browse files Browse the repository at this point in the history
Fix: style on selected range
  • Loading branch information
farhoudshapouran committed Sep 15, 2024
2 parents 334bcf7 + 4abc1fb commit be9df59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/DaySelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DaySelector = () => {
let rightCrop = day.dayOfMonth === fullDaysInMonth;

const isFirstDayOfMonth = day.dayOfMonth === 1;
const isLastDayOfMonth = day.dayOfMonth === fullDaysInMonth;
const isLastDayOfMonth = ((day?.dayOfMonth || 0) - ((day?.dayOfMonth || 0) - day.day)) === fullDaysInMonth;

Check failure on line 58 in src/components/DaySelector.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `·((day?.dayOfMonth·||·0)·-·((day?.dayOfMonth·||·0)·-·day.day))·===` with `⏎············(day?.dayOfMonth·||·0)·-·((day?.dayOfMonth·||·0)·-·day.day)·===⏎···········`

const isToday = areDatesOnSameDay(day.date, today);
let inRange = false;
Expand Down Expand Up @@ -86,7 +86,8 @@ const DaySelector = () => {

if (
(isFirstDayOfMonth && selectedEndDay) ||
(isLastDayOfMonth && selectedStartDay)
(isLastDayOfMonth && selectedStartDay) ||
dayjs(startDate).format('DDMMYYYY') === dayjs(endDate).format('DDMMYYYY')

Check failure on line 90 in src/components/DaySelector.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎···············`
) {
inRange = false;
}
Expand Down

0 comments on commit be9df59

Please sign in to comment.