Date doesn't allow empty time?

Don’t know if I made a mistake in my blueprint, but it seems like I cannot have an empty time if the time field is enable.

dateend:
    label: Date end
    type: date
    width: 1/2
    display: DD.MM.YYYY
    time: true
    translate: false

It’s for an event page, where sometime time are specified sometimes is not. Therefore this field should be empty if no time is specified, but in this case, it returns the current time.

3 Likes

Still not solved but in the meantime I remove the time option time: false and manually add another field:

timeend:
     type: time

It’s sadly not so efficient since Kirby seems to have the ability to have time in the date field.

Should this be add in the github as a bug or a feature?

Yes, please report on GitHub, thank you!

Thanks for your reply. Issue added here:


Edit: answer from GitHub by distantnative

It’s actually not a bug but intended. If you activate time on a date field, either the whole field is empty or it needs to have a time. Just an empty time input with a set date won’t work. If you need that use case, you should rather look at having separate date and time fields.

I don’t agree on that but that’s the way it is at the moment, hopefully we can see this field evolve into something more flexible. :v:

1 Like