2sxc:字段日期和时间默认值

2sxc: Field Date and Time default value

我需要在我的字段中包含日期时间内容类型。 寻找文档我在这里找到了相同的 http://2sxc.org/en/Docs-Manuals/Feature/feature/2874

Date and Time no relevant settings to explain. Note that the output-template will usually choose to show only the date, only the time etc. So it's the same data-field no matter what you're actually entering.

如何为编辑输入数据字段设置默认日期值,如 Datetime.Now? 我尝试了各种命令,但它给了我无效的日期。 我还尝试了 dnn 令牌 [DateTime: Now] 但它不起作用。 谢谢

要预填日期时间,有两种选择

  1. 创建新项目的 dnn 页面中的 link 可以将其作为预填充传递 - http://2sxc.org/en/Docs-Manuals/Prefill-new-Forms

  2. 有一个隐藏的 API 可以使用 JavaScript 来实现,但它还不是官方的,相当技术性,而且仍然容易改变。所以我会使用#1