diff --git a/src/components/Dialog/ResponsiveDialog.tsx b/src/components/Dialog/ResponsiveDialog.tsx
index 9598478..fe9bcb6 100644
--- a/src/components/Dialog/ResponsiveDialog.tsx
+++ b/src/components/Dialog/ResponsiveDialog.tsx
@@ -104,9 +104,8 @@ function ResponsiveDialog({
"& .MuiDialog-paper": {
maxWidth: isExpanded ? "100%" : normalMaxWidth,
width: "100%",
- // height: isExpanded ? `calc(100vh - ${headerHeight})` : "90vh",
+ height: isExpanded ? `calc(100vh - ${headerHeight})` : undefined,
margin: isExpanded ? `${headerHeight} 0 0 0` : "32px",
- maxHeight: isExpanded ? `calc(100vh - ${headerHeight})` : "790px",
boxShadow: isExpanded ? "none !important" : undefined,
transition: isExpanded ? "none !important" : undefined,
},
diff --git a/src/components/Event/EventFormFields.tsx b/src/components/Event/EventFormFields.tsx
index 744aa1b..284a77b 100644
--- a/src/components/Event/EventFormFields.tsx
+++ b/src/components/Event/EventFormFields.tsx
@@ -237,6 +237,16 @@ export default function EventFormFields({
onCalendarChange?.(newCalendarId);
};
+ const getRoundedCurrentTime = () => {
+ const now = new Date();
+ const minutes = now.getMinutes();
+ const roundedMinutes = minutes < 30 ? 0 : 30;
+ now.setMinutes(roundedMinutes);
+ now.setSeconds(0);
+ now.setMilliseconds(0);
+ return now;
+ };
+
return (
<>
@@ -330,14 +340,32 @@ export default function EventFormFields({
{
- const endDate = new Date(end);
- const startDate = new Date(start);
const newAllDay = !allday;
- setAllDay(newAllDay);
- if (endDate.getDate() === startDate.getDate()) {
- endDate.setDate(startDate.getDate() + 1);
+
+ if (newAllDay) {
+ // No allday => allday: existing logic
+ const endDate = new Date(end);
+ const startDate = new Date(start);
+ if (endDate.getDate() === startDate.getDate()) {
+ endDate.setDate(startDate.getDate() + 1);
+ setEnd(formatLocalDateTime(endDate));
+ }
+ } else {
+ // Allday => no allday: set end date = start date with rounded time
+ const startDate = new Date(start);
+ const currentTime = getRoundedCurrentTime();
+
+ // Set start time
+ startDate.setHours(currentTime.getHours());
+ startDate.setMinutes(currentTime.getMinutes());
+ setStart(formatLocalDateTime(startDate));
+
+ // Set end date = start date, with time 30 minutes after start
+ const endDate = new Date(startDate);
+ endDate.setMinutes(endDate.getMinutes() + 30);
setEnd(formatLocalDateTime(endDate));
}
+
handleAllDayChange(newAllDay);
}}
/>
@@ -347,7 +375,9 @@ export default function EventFormFields({
{
const newShowRepeat = !showRepeat;
@@ -390,13 +420,13 @@ export default function EventFormFields({
- {showRepeat && (
+ {(showRepeat || (typeOfAction === "solo" && repetition?.freq)) && (
)}
diff --git a/src/features/Events/EventDisplayPreview.tsx b/src/features/Events/EventDisplayPreview.tsx
index 537b776..1c236cc 100644
--- a/src/features/Events/EventDisplayPreview.tsx
+++ b/src/features/Events/EventDisplayPreview.tsx
@@ -65,6 +65,7 @@ export default function EventPreviewModal({
const [showAllAttendees, setShowAllAttendees] = useState(false);
const [openFullDisplay, setOpenFullDisplay] = useState(false);
const [openUpdateModal, setOpenUpdateModal] = useState(false);
+ const [hidePreview, setHidePreview] = useState(false);
const [openEditModePopup, setOpenEditModePopup] = useState(
null
);
@@ -108,7 +109,7 @@ export default function EventPreviewModal({
return (
<>
onClose({}, "backdropClick")}
style={{ overflow: "auto" }}
title={
@@ -143,10 +144,12 @@ export default function EventPreviewModal({
onClick={() => {
if (isRecurring) {
setAfterChoiceFunc(() => () => {
+ setHidePreview(true);
setOpenUpdateModal(true);
});
setOpenEditModePopup("edit");
} else {
+ setHidePreview(true);
setOpenUpdateModal(true);
}
}}
@@ -509,7 +512,10 @@ export default function EventPreviewModal({
/>
setOpenUpdateModal(false)}
+ onClose={() => {
+ setOpenUpdateModal(false);
+ setHidePreview(false);
+ }}
onCloseAll={() => {
setOpenUpdateModal(false);
onClose({}, "backdropClick");
diff --git a/src/features/Events/EventUpdateModal.tsx b/src/features/Events/EventUpdateModal.tsx
index e300da0..924d717 100644
--- a/src/features/Events/EventUpdateModal.tsx
+++ b/src/features/Events/EventUpdateModal.tsx
@@ -508,7 +508,8 @@ function EventUpdateModal({
const repetitionRulesChanged =
JSON.stringify(oldRepetition) !== JSON.stringify(newRepetition) ||
- timezoneChanged;
+ timezoneChanged ||
+ event.allday !== allday;
if (repetitionRulesChanged) {
// Repetition rules changed - need server to recalculate instances