That work’s and is what I wanted to use in my tree! Thanks a lot, Martin!
Solved this problem. When the dialog was created, in the coresponding function, the allday-field was hidden. And it seems that the appointment is set to “allday” by default.