Skip to content

Commit

Permalink
Merge pull request #53 from appannie/fix/hover-selection
Browse files Browse the repository at this point in the history
fix: get hovered date by standard format
  • Loading branch information
kaix1n authored Jun 2, 2023
2 parents 97da5ff + 4ba6cb3 commit b2e1bab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Quarters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const Quarters = (props) => {
return (
<li
key={index}
data-month={`${format(date, 'yyyy-MM')}`}
data-month={`${format(date, 'yyyy-MM-dd')}`}
className={classNames({
[styles.selected]:
isSameMonth(date, start) ||
Expand Down
4 changes: 2 additions & 2 deletions src/Years/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ const Years = ({
? ''
: `Set date to ${format(date, 'MMMM do, yyyy')}`
}
data-month={`${format(date, 'yyyy-MM')}`}
data-month={`${format(date, 'yyyy-MM-dd')}`}
{...handlers}
>
<div
className={styles.selection}
data-month={`${format(date, 'yyyy-MM')}`}
data-month={`${format(date, 'yyyy-MM-dd')}`}
>
{format(date, 'MMM', { locale: locale?.locale })}
</div>
Expand Down

0 comments on commit b2e1bab

Please sign in to comment.