Contentful logo

Contentful Community

Set default date on Date / Time picker

#1

It would be very helpful to be able to use the contentful date / time picker - and allow the ability to set a default date and time.

Can the UI extension source for the Date / Time picker be made available so that we can extend to allow for this function?

0 Likes

#2

Hey @team5.amaze!

Thanks for your question.
Currently, default dates suggested in regards to your location.
I think you’re asking for default/predefined values. It’s pretty popular feature request. Unfortunately, it’s not directly supported in Contentful :disappointed:
But, general concept of workaround could be found here: Creating a default value to predefine checkbox items.
Also, yes, I think it’s possible to tackle it with UI extensions. Have you already tried it? Do you need some help with this?

0 Likes

#3

Hi @andrey !

I’m having a similar problem… I want to have a DateTime field, which is filled with the current date, when created. I think UI Extension here is the right way to go. But in your comment you say “default date is suggested…”. Is there a way to automatically fill suggested value in the field?

Thank you!

P.S.: regarding style guides: is there a way to use DateTimePicker in UI Extension styled, as a default Contentful DataTimePicker?

0 Likes