Fix calendar color when creating a calendar

This commit is contained in:
Bruno Bernardino
2025-09-06 19:46:47 +01:00
parent 49dbc724c8
commit 7f81d2a0b5
5 changed files with 22 additions and 9 deletions

View File

@@ -278,8 +278,15 @@ export default function Calendars({ initialCalendars }: CalendarsProps) {
onChange={(event) =>
openCalendar.value = { ...openCalendar.value!, calendarColor: event.currentTarget.value }}
>
{CALENDAR_COLOR_OPTIONS.map((color) => <option key={color} value={getColorAsHex(color)}>{color}
</option>)}
{CALENDAR_COLOR_OPTIONS.map((color) => (
<option
key={color}
value={getColorAsHex(color)}
selected={openCalendar.value?.calendarColor === getColorAsHex(color)}
>
{color}
</option>
))}
</select>
<span
class={`w-5 h-5 block rounded-full`}