Could you please explain to me or show me an example of how to set the starting time to e.g. 13:30 when someone creates a new event on a certain date? Since the start date and time are in 1 value, how do I keep the date but only change the hours and minutes? Thanks for the help!
Support Forum
Pfew, after a lot of puzzling, I managed to get it working!
listeners : {
eventAutoCreated (event) {
var date = DateHelper.format(event.eventRecord.data.startDate, 'YYYY-MM-DD');
var starttime = date + ' 13:30';
var endtime = date + ' 14:30';
event.eventRecord.data.startDate= DateHelper.parse(starttime, 'YYYY-MM-DD HH:mm');
event.eventRecord.data.endDate= DateHelper.parse(endtime, 'YYYY-MM-DD HH:mm');
}
}
Probably it can be done in an easier/cleaner way, but I am no javascript expert
Thanks for the help!