It seems that the issue is with your date parameters.
In Google Apps Script, new Date() only accepts date strings that are accepted worldwide. For example, YYYY-MM-DDTHH:mm:ss.sssZ
.
To fix your script, you can try this code below. This works successfully on my end.
function myFunction1() {
var calendar = CalendarApp.getCalendarById('ip');
calendar.createEvent("my title",new Date ('2021-01-27'),new Date ('2021-01-27'));
}
You can also specify the time by following the date format you are using.
Reference:
Everything You Need to Know About Date in JavaScript
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…