List Datetime in forms

Hi everyone.

Currently playing with Grav and pages forms, I’m having a hard time with date and datetime fields.
First of all, I’m not totally sure of what I should expect from the date field. Right now, it just looks like a text field but maybe I’m just using it wrong.
I’m also trying to use datetime fields nested into a list field. Something like the header.buttons in the showcase.yaml form from antimatter. The problem is that once nested, it just looks like any other text field. I suspect it’s an expected behaviour but if you got any ideas on how to achieve that, I would be glad.

Thank you,

Hi, post some blueprints examples here (properly formatted by using triple dashes or triple backticks) and tell what you expect / what is happening so I can add them to the theme and check.

For the first question, I used something like this:

   type: date
   label: Date
   name: date

Actually, I don’t really know what to expect as I didn’t find any use of the date type in antimatter or in the system blueprints. I think I expected something like a “select a date in a calendar” field but I just got a regular text field where I can write text and without any “valid/unvalid” behaviour.

About the nested list>datetime, my form is similar to this:

   label: Dates
   name: dateslist
   type: list
         type: datetime
         label: Date in
         name: datein
         type: datetime
         label: Date out

I use the list so I can add a undefined amount of datein/dateout couples to a page. It seems to work quite well within the button tab of antimatter>showcase blueprint.
Usually, when I use the datetime field, I have a calendar/time selector but once nested, It becomes a regular text field, leaving me unable to pick a date.

I hope I gave you the informations you need.

date uses the HTML5 date field. Depends on the browser how it’s rendered. Chrome:

Screen Shot 2016-02-15 at 13

datetime uses JS rendering:

Screen Shot 2016-02-15 at 13

As for datetime fields in lists, not yet supported due to more JS needed to render them. Hopefully will be supported in the next admin javascript iteration we’re doing.

Ok, thanks for the quick answer.
I think I will use date for now. Too bad it’s not yet supported by all browsers.