MOBILE-3909 calendar: Always use current time in new events

main
Dani Palou 2022-03-16 09:08:24 +01:00
parent 580f4a9f8a
commit 975549b7ab
1 changed files with 3 additions and 1 deletions

View File

@ -374,7 +374,9 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy {
const selectedDay = this.manager?.getSelectedItem();
if (selectedDay) {
params.timestamp = selectedDay.moment.unix() * 1000;
// Use current time but in the specified day.
const now = moment();
params.timestamp = selectedDay.moment.clone().set({ hour: now.hour(), minute: now.minute() }).unix() * 1000;
}
}