Closed sebastiangreger closed 2 years ago
Just on my phone, so apologies that I can't check myself right now. But I think it's because your blueprint defines the step as 1 day and everything gets rounded to the nearest day therefore.
I'm having the same issue with every date field, without having set step
at all.
date:
type: date
time: true
default: today
# same with default: now
display: DD.MM.YYYY
See also this thread in the forum: https://forum.getkirby.com/t/panel-time-defaults-to-00-00/20896?u=bruno
But I think it's because your blueprint defines the step as 1 day and everything gets rounded to the nearest day therefore.
@distantnative But step is set for time
prop. Shouldn't it be 1 minute?
That happens when I read on the phone 🙈 I would imagine all of it is related to the step mechanism but I also agree if it's date and time the default step should be based on minute, if only date then on day
so what's the definite solution to store date & time with a correct time default? it's always showing 00:00
, no matter what I do...
Would also be nice to have a time picker in the popup as well.
@MaluNoPeleke could you please create this as an idea over at feedback.getkirby.com? Thanks?
I guess I found one: https://kirby.nolt.io/304
It would be very nice to solve this as it is a problem for RSS automations with Mailchimp, thanks! <3
same, here would be very interested in a fix @distantnative.
Could this be part of Kirby 3.6.0 @afbora @bastianallgeier?
Not solved on 3.6, right?
✅ will be fixed in 3.6.2
Hello,
in 3.6.6 it is not corrected. Do not forget us :)
I have a blueprint using
date:
type: date
time:
step: 1
display: HH:mm
default: now
and this has worked fine ever since 3.6.2 – it sets both date and time to the current moment, as expected.
@vivaneo Have you verified that the default: now
statement is indented correctly? It has to be a sibling to time:
, not its child.
and this has worked fine ever since 3.6.2 – it sets both date and time to the current moment, as expected.
can confirm, works fine in 3.6.2
I can also confirm that the date field works absolutely correctly.
I think @vivaneo actually has a different problem, which relates to the slug field adding zeros for the time even when the date has no time set.
Syncing slug field with date:
Slug field used with date field with time:
Slug field used with date field without time:
This happens because $store stores the date field with the time (e.g 2019-06-25 00:00:00).
See https://forum.getkirby.com/t/date-field-doesnt-save-hours-and-minutes-on-page-creation/21112/2
I think you're right.
I use the "kirby-plugin-custom-add-fields" plugin which is used to copy data to another field (synchronization).
I want to copy the title in the url:
Note: the hour, the minutes and the seconds do not interest me.
Is it a plugin, browser or getkirby problem?
Is it a plugin, browser or getkirby problem?
As I wrote above, in the Panel store, the date is stored with the zeros for the time no matter what you set in the blueprint. And the slug field then uses this $store value for synching. So it is somehow an issue with the date field but only in combination with the slug field. On the other hand I wonder why you even need the slug field if you want to create the slug from the date, unless you want to be able to modify it manually?
Describe the bug
When creating a new page in the Panel, a date field with
default
set tonow
always shows00:00
as time.To Reproduce
Steps to reproduce the behavior:
00:00
(despitedefault
set tonow
in thenote.yml
blueprint)The error also persists when altering the blueprint as follows:
Expected behavior
A time field with
time: true
anddefault: now
would use the current time, either by default or at least when the time value is also set todefault: now
.Kirby Version
3.5.1
Console output
No console output.
Desktop: