我正在尝试使用jQuery datepicker填充备用日期字段。 但是没有调用jQuery-Script-Block。 如何正确调用此代码?
此致 的Thorsten
<script type="text/javascript" src="/javascripts/jquery/i18n/jquery.ui.datepicker-de.js"></script>
<script type="text/javascript">
$.datepicker.setDefaults(
$.extend(
{'dateFormat':'dd.mm.yy'},
$.datepicker.regional['de']
)
);
// controlls the format of hidden alternate date field
$( "#event-BeginOfEventAt" ).datepicker({
dateFormat: "dd.mm.yy",
altFormat: "YYYY-MM-DD",
altField: "#altBeginOfEventAt"
});
$( "#event-EndOfEventAt" ).datepicker({
dateFormat: "dd.mm.yy",
altFormat: "YYYY-MM-DD",
altField: "#altEndOfEventAt"
});
</script>
<input type="text" id="altBeginOfEventAt" name="altBeginOfEventAt" />
<input type="text" id="altEndOfEventAt" name="altEndOfEventAt" />
#datePicker(objectName="event", property="BeginOfEventAt", class="datePicker", dateFormat="dd.mm.yy", label=false)#
#datePicker(objectName="event", property="EndOfEventAt", class="datePicker", dateFormat="dd.mm.yy", label=false)#