Skip to content

Commit

Permalink
Merge pull request #795 from culturecreates/feature/issue-9
Browse files Browse the repository at this point in the history
Feature/issue 9
  • Loading branch information
AbhishekPAnil authored Nov 17, 2023
2 parents 574c955 + 4d916b7 commit 61ff4c4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/RecurringEvents/RecurringEvents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const RecurringEvents = function ({
const [subEventCount, setSubEventCount] = useState(0);
const startDateRecur = Form.useWatch('startDateRecur', form);
const { t } = useTranslation();
Form.useWatch('endTimeRecur', form);
Form.useWatch('startTimeRecur', form);

useEffect(() => {
if (eventDetails) {
Expand Down Expand Up @@ -454,6 +456,11 @@ const RecurringEvents = function ({
use12Hours={i18n?.language === 'en' ? true : false}
format={i18n?.language === 'en' ? 'h:mm a' : 'HH:mm'}
data-cy="multiple-start-time"
onSelect={(value) => {
form.setFieldsValue({
startTimeRecur: value,
});
}}
/>
</Form.Item>
</Col>
Expand All @@ -470,6 +477,11 @@ const RecurringEvents = function ({
disabledHours={disabledHours}
disabledMinutes={disabledMinutes}
data-cy="multiple-end-time"
onSelect={(value) => {
form.setFieldsValue({
endTimeRecur: value,
});
}}
/>
</Form.Item>
</Col>
Expand Down
12 changes: 12 additions & 0 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ function AddEvent() {
const navigate = useNavigate();
const location = useLocation();
const [form] = Form.useForm();
Form.useWatch('startTime', form);
Form.useWatch('endTime', form);
const timestampRef = useRef(Date.now()).current;
const { calendarId, eventId } = useParams();
let [searchParams] = useSearchParams();
Expand Down Expand Up @@ -1603,6 +1605,11 @@ function AddEvent() {
placeholder={t('dashboard.events.addEditEvent.dates.timeFormatPlaceholder')}
use12Hours={i18n?.language === 'en' ? true : false}
format={i18n?.language === 'en' ? 'h:mm a' : 'HH:mm'}
onSelect={(value) => {
form.setFieldsValue({
startTime: value,
});
}}
data-cy="single-date-start-time"
/>
</Form.Item>
Expand All @@ -1621,6 +1628,11 @@ function AddEvent() {
placeholder={t('dashboard.events.addEditEvent.dates.timeFormatPlaceholder')}
use12Hours={i18n?.language === 'en' ? true : false}
format={i18n?.language === 'en' ? 'h:mm a' : 'HH:mm'}
onSelect={(value) => {
form.setFieldsValue({
endTime: value,
});
}}
data-cy="single-date-end-time"
/>
</Form.Item>
Expand Down

0 comments on commit 61ff4c4

Please sign in to comment.