在日历上将当前日期设置为默认值

时间:2014-03-27 11:22:01

标签: javascript jquery datetime datepicker marketo

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

我希望将此归档为"今天"日期除非由用户更改?

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

但是,除非您通过日历选择它,否则似乎无法在字段中输入当前日期

1 个答案:

答案 0 :(得分:0)

以下是一个示例脚本,您可以在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

相关问题