我有一个 AMP 日期选择器。我想在渲染 datepicer 时在 datepicker 的底部显示当前日期。
我正在尝试这样的事情。但它不显示当前日期。
<amp-date-picker
id="departure-date-pickerOW1"
media="(max-width: 52rem)"
date="P0D"
type="single"
mode="overlay"
layout="container"
class="flex flex1"
number-of-months="1"
day-size="36"
input-selector="[id=departure-dateOW1]"
on="activate:AMP.setState({curr_date: departure-date-
pickerOW1.today})">
<input type="text" title="departure date" id="departure-dateOW1"
class="date-field departure-date" placeholder="Departure date">
</input>
<span class="ico-sprites ico-calendar absolute"></span>
<template type="amp-mustache" info-template >
<span [text]="curr_date">current date</span>
</template>
</amp-date-picker>