【问题标题】:Setting current date as default on calender将当前日期设置为日历上的默认日期
【发布时间】:2014-05-06 08:03:46
【问题描述】:

我在 Marketo 中选择了日期字段,它使用日历供您选择所需的日期。

除非用户更改,否则我希望此文件默认为“今天”日期?

这可以吗?我在尝试FieldID = {{system.date}}

但似乎没有在字段中输入当前日期,除非您通过日历选择它

【问题讨论】:

  • 能否提供 marketo 库或框架的链接?

标签: javascript jquery datetime datepicker marketo


【解决方案1】:

这是一个示例脚本,您可以在 Marketo 中使用该脚本将今天的日期输出为令牌:

## Access Velocity's calendar object
#set($x = $date.calendar)

## Format date
#set($current_date = $date.format('dd-MM-yyyy', $x.getTime()))

## Returns today's date
$current_date

有关使用令牌脚本的更多信息,请参阅Marketo's developer documentation

【讨论】:

    最近更新 更多