Skip to content

Commit

Permalink
Enhancement: go to current day when clicking calendar month name (#2091)
Browse files Browse the repository at this point in the history
  • Loading branch information
denispapec committed Sep 30, 2023
1 parent 67ebe29 commit 56f46ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/calendar/monthly-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default function MonthlyView({ service }) {
return <div className="w-full text-center">
<div className="flex-col">
<span><button type="button" onClick={ () => setShowDate(showDate.minus({ months: 1 }).startOf("day")) } className={classNames(monthButton)}>&lt;</button></span>
<span>{ showDate.setLocale(i18n.language).toFormat("MMMM y") }</span>
<span><button type="button" onClick={ () => setShowDate(currentDate.startOf("day")) }>{ showDate.setLocale(i18n.language).toFormat("MMMM y") }</button></span>
<span><button type="button" onClick={ () => setShowDate(showDate.plus({ months: 1 }).startOf("day")) } className={classNames(monthButton)}>&gt;</button></span>
</div>

Expand Down

0 comments on commit 56f46ae

Please sign in to comment.