diff --git a/.gitignore b/.gitignore index 8e1b3993..5bf1c92b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ backup public public/main.js *.log -storybook-static \ No newline at end of file +storybook-static +yarn.lock \ No newline at end of file diff --git a/components/date-picker/src/Calendar.svelte b/components/date-picker/src/Calendar.svelte index a574fc91..1b44a584 100644 --- a/components/date-picker/src/Calendar.svelte +++ b/components/date-picker/src/Calendar.svelte @@ -58,14 +58,13 @@ if (v.getMonth() != selectedMonth) { clsList.push(`${dateClass}--not-in-view`); - } else { - if ( - isValid && - v.getDate() == day && - v.getMonth() == month && - v.getFullYear() == year - ) - clsList.push(`${dateClass}--selected`); + } else if ( + isValid && + v.getDate() == day && + v.getMonth() == month && + v.getFullYear() == year + ) { + clsList.push(`${dateClass}--selected`); } if (disabledDate(v)) clsList.push(`${dateClass}--disabled`); return clsList.join(" "); @@ -75,24 +74,24 @@