export const clicked = signal(false);
const handleClickDay = (date) => {
const day = date.getDate().toString().padStart(2,'0')
const month = (date.getMonth()+1).toString().padStart(2,'0')
const year = date.getYear().toString().padStart(2,'0')
clickedDate.value = `${day}/${month}/${year}`;
console.log(clickedDate.value);
clicked.value = true;
}
The imported value in another component needs to be changed from true to false.
I attempted to modify it directly, but encountered an error:
{clicked.value = false}
The following error message appeared:
Cannot update a component (CalendarBase) while rendering a different component (MiniTodo). To locate the bad setState() call inside MiniTodo, follow the stack trace as described