Added formatMessage wrapper. Updated messages.

This commit is contained in:
Mike Cao committed 2023-08-17 16:28:26 -07:00
1 parent b157ba540f
commit 211ecf7edb
105 files changed
+3085 -21

No files matched your search

+16 -11
View File
@@ -21,8 +21,9 @@ export function MonthSelect({ date = new Date(), onChange }) {
const year = date.getFullYear();
const ref = useRef();
const handleChange = date => {
const handleChange = (close, date) => {
onChange(`range:${startOfMonth(date).getTime()}:${endOfMonth(date).getTime()}`);
close();
};
return (
@@ -36,11 +37,13 @@ export function MonthSelect({ date = new Date(), onChange }) {
</Icon>
</Button>
<Popup className={styles.popup} alignment="start">
<CalendarMonthSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange}
/>
{close => (
<CalendarMonthSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange.bind(null, close)}
/>
)}
</Popup>
</PopupTrigger>
<PopupTrigger>
@@ -51,11 +54,13 @@ export function MonthSelect({ date = new Date(), onChange }) {
</Icon>
</Button>
<Popup className={styles.popup} alignment="start">
<CalendarYearSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange}
/>
{close => (
<CalendarYearSelect
date={date}
locale={getDateLocale(locale)}
onSelect={handleChange.bind(null, close)}
/>
)}
</Popup>
</PopupTrigger>
</div>