[opencms-dev] Default value for OpenCmsDateTime
Michael Emmerich
m.emmerich at alkacon.com
Fri Apr 4 13:47:24 CEST 2025
Hello Atle,
try this here:
<Setting>
<PropertyName>DatePublish</PropertyName>
<Widget>datetime</Widget>
*<Default><![CDATA[%(currenttime)]]></Default>*
<WidgetConfig><![CDATA[calendar,time,default=now]]></WidgetConfig>
</Setting>
Kind regards,
Michael
Am 04.04.25 um 13:34 schrieb Atle Enersen via opencms-dev:
>
> Hello.
>
> I cannont find how to get current time set automatically in a
> OpenCmsDateTime-field. This is the current setting:
>
> <xsd:element name="DatePublish" type="OpenCmsDateTime" />
>
> <Setting>
>
> <PropertyName>DatePublish</PropertyName>
>
> <Widget>datetime</Widget>
>
> <WidgetConfig><![CDATA[calendar,time,default=now]]></WidgetConfig>
>
> </Setting>
>
> On OpenCms 19. All help are welcome 😊
>
> Best regards, Atle Enersen.
>
> --
>
> Telefon: +47 48 06 31 71
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
--
Michael Emmerich
Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com -http://www.opencms.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20250404/1459a2d5/attachment.htm>
More information about the opencms-dev
mailing list